Commit 93745df1 authored by Jan Kara's avatar Jan Kara Committed by Christian Brauner

PM: hibernate: Drop unused snapshot_test argument

snapshot_test argument is now unused in swsusp_close() and
load_image_and_restore(). Drop it

CC: linux-pm@vger.kernel.org
Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatar"Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230927093442.25915-17-jack@suse.czSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent e017d304
......@@ -684,7 +684,7 @@ static void power_down(void)
cpu_relax();
}
static int load_image_and_restore(bool snapshot_test)
static int load_image_and_restore(void)
{
int error;
unsigned int flags;
......@@ -694,12 +694,12 @@ static int load_image_and_restore(bool snapshot_test)
lock_device_hotplug();
error = create_basic_memory_bitmaps();
if (error) {
swsusp_close(snapshot_test);
swsusp_close();
goto Unlock;
}
error = swsusp_read(&flags);
swsusp_close(snapshot_test);
swsusp_close();
if (!error)
error = hibernation_restore(flags & SF_PLATFORM_MODE);
......@@ -788,7 +788,7 @@ int hibernate(void)
pm_pr_dbg("Checking hibernation image\n");
error = swsusp_check(false);
if (!error)
error = load_image_and_restore(false);
error = load_image_and_restore();
}
thaw_processes();
......@@ -952,7 +952,7 @@ static int software_resume(void)
/* The snapshot device should not be opened while we're running */
if (!hibernate_acquire()) {
error = -EBUSY;
swsusp_close(true);
swsusp_close();
goto Unlock;
}
......@@ -973,7 +973,7 @@ static int software_resume(void)
goto Close_Finish;
}
error = load_image_and_restore(true);
error = load_image_and_restore();
thaw_processes();
Finish:
pm_notifier_call_chain(PM_POST_RESTORE);
......@@ -987,7 +987,7 @@ static int software_resume(void)
pm_pr_dbg("Hibernation image not present or could not be loaded.\n");
return error;
Close_Finish:
swsusp_close(true);
swsusp_close();
goto Finish;
}
......
......@@ -172,7 +172,7 @@ int swsusp_check(bool exclusive);
extern void swsusp_free(void);
extern int swsusp_read(unsigned int *flags_p);
extern int swsusp_write(unsigned int flags);
void swsusp_close(bool exclusive);
void swsusp_close(void);
#ifdef CONFIG_SUSPEND
extern int swsusp_unmark(void);
#endif
......
......@@ -444,7 +444,7 @@ static int get_swap_writer(struct swap_map_handle *handle)
err_rel:
release_swap_writer(handle);
err_close:
swsusp_close(false);
swsusp_close();
return ret;
}
......@@ -509,7 +509,7 @@ static int swap_writer_finish(struct swap_map_handle *handle,
if (error)
free_all_swap_pages(root_swap);
release_swap_writer(handle);
swsusp_close(false);
swsusp_close();
return error;
}
......@@ -1569,7 +1569,7 @@ int swsusp_check(bool exclusive)
* @exclusive: Close the resume device which is exclusively opened.
*/
void swsusp_close(bool exclusive)
void swsusp_close(void)
{
if (IS_ERR(hib_resume_bdev_handle)) {
pr_debug("Image device not initialised\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment