Jelajahi Sumber

PM / sleep: Make pm_prepare_console() return void

Nothing is using its return value so change it to return void.

No functionality change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Borislav Petkov 9 tahun lalu
induk
melakukan
ca5f2b4c4f
2 mengubah file dengan 6 tambahan dan 7 penghapusan
  1. 2 3
      include/linux/suspend.h
  2. 4 4
      kernel/power/console.c

+ 2 - 3
include/linux/suspend.h

@@ -18,12 +18,11 @@ static inline void pm_set_vt_switch(int do_switch)
 #endif
 #endif
 
 
 #ifdef CONFIG_VT_CONSOLE_SLEEP
 #ifdef CONFIG_VT_CONSOLE_SLEEP
-extern int pm_prepare_console(void);
+extern void pm_prepare_console(void);
 extern void pm_restore_console(void);
 extern void pm_restore_console(void);
 #else
 #else
-static inline int pm_prepare_console(void)
+static inline void pm_prepare_console(void)
 {
 {
-	return 0;
 }
 }
 
 
 static inline void pm_restore_console(void)
 static inline void pm_restore_console(void)

+ 4 - 4
kernel/power/console.c

@@ -126,17 +126,17 @@ out:
 	return ret;
 	return ret;
 }
 }
 
 
-int pm_prepare_console(void)
+void pm_prepare_console(void)
 {
 {
 	if (!pm_vt_switch())
 	if (!pm_vt_switch())
-		return 0;
+		return;
 
 
 	orig_fgconsole = vt_move_to_console(SUSPEND_CONSOLE, 1);
 	orig_fgconsole = vt_move_to_console(SUSPEND_CONSOLE, 1);
 	if (orig_fgconsole < 0)
 	if (orig_fgconsole < 0)
-		return 1;
+		return;
 
 
 	orig_kmsg = vt_kmsg_redirect(SUSPEND_CONSOLE);
 	orig_kmsg = vt_kmsg_redirect(SUSPEND_CONSOLE);
-	return 0;
+	return;
 }
 }
 
 
 void pm_restore_console(void)
 void pm_restore_console(void)