summaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-31 14:55:14 +0200
committerJens Axboe <axboe@kernel.dk>2023-06-05 10:55:20 -0600
commitd6545e687271ab27472eebff770f2de6a5f1a464 (patch)
tree8b8e1b20175ac030bd3918dde3f4ad0d74e45c8d /kernel/power/power.h
parent02b42d58f3898134b900ff3030561099e38adb32 (diff)
downloadlinux-d6545e687271ab27472eebff770f2de6a5f1a464.tar.gz
linux-d6545e687271ab27472eebff770f2de6a5f1a464.tar.bz2
linux-d6545e687271ab27472eebff770f2de6a5f1a464.zip
PM: hibernate: remove the global snapshot_test variable
Passing call dependent variable in global variables is a huge antipattern. Fix it up. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20230531125535.676098-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index b83c8d5e188d..978189fcafd1 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -59,7 +59,6 @@ asmlinkage int swsusp_save(void);
/* kernel/power/hibernate.c */
extern bool freezer_test_done;
-extern bool snapshot_test;
extern int hibernation_snapshot(int platform_mode);
extern int hibernation_restore(int platform_mode);
@@ -174,7 +173,7 @@ extern int swsusp_swap_in_use(void);
#define SF_HW_SIG 8
/* kernel/power/hibernate.c */
-extern int swsusp_check(void);
+int swsusp_check(bool snapshot_test);
extern void swsusp_free(void);
extern int swsusp_read(unsigned int *flags_p);
extern int swsusp_write(unsigned int flags);