summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-18 04:18:28 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-19 05:41:26 -0400
commit0b385a0c3bd3f6d1044728b732bfc7dfb01c9fb5 (patch)
treea15da195f726fe5bbbe006d58ff35fb56f325658
parent3540d38dd38308b811c6ddaf2fde03e9948cc1c1 (diff)
PM: suspend: Rename pm_suspend_via_s2idle()
The name of pm_suspend_via_s2idle() is confusing, as it doesn't reflect the purpose of the function precisely enough and it is very similar to pm_suspend_via_firmware(), which has a different purpose, so rename it as pm_suspend_default_s2idle() and update its only caller, i8042_register_ports(), accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/serio/i8042.c2
-rw-r--r--include/linux/suspend.h4
-rw-r--r--kernel/power/suspend.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 6462f1798fbb..8384abc41d7f 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1410,7 +1410,7 @@ static void __init i8042_register_ports(void)
1410 * behavior on many platforms using suspend-to-RAM (ACPI S3) 1410 * behavior on many platforms using suspend-to-RAM (ACPI S3)
1411 * by default. 1411 * by default.
1412 */ 1412 */
1413 if (pm_suspend_via_s2idle() && i == I8042_KBD_PORT_NO) 1413 if (pm_suspend_default_s2idle() && i == I8042_KBD_PORT_NO)
1414 device_set_wakeup_enable(&serio->dev, true); 1414 device_set_wakeup_enable(&serio->dev, true);
1415 } 1415 }
1416} 1416}
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 05645f726815..d07ae7fb9315 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -282,7 +282,7 @@ static inline bool idle_should_enter_s2idle(void)
282 return unlikely(s2idle_state == S2IDLE_STATE_ENTER); 282 return unlikely(s2idle_state == S2IDLE_STATE_ENTER);
283} 283}
284 284
285extern bool pm_suspend_via_s2idle(void); 285extern bool pm_suspend_default_s2idle(void);
286extern void __init pm_states_init(void); 286extern void __init pm_states_init(void);
287extern void s2idle_set_ops(const struct platform_s2idle_ops *ops); 287extern void s2idle_set_ops(const struct platform_s2idle_ops *ops);
288extern void s2idle_wake(void); 288extern void s2idle_wake(void);
@@ -314,7 +314,7 @@ static inline void pm_set_suspend_via_firmware(void) {}
314static inline void pm_set_resume_via_firmware(void) {} 314static inline void pm_set_resume_via_firmware(void) {}
315static inline bool pm_suspend_via_firmware(void) { return false; } 315static inline bool pm_suspend_via_firmware(void) { return false; }
316static inline bool pm_resume_via_firmware(void) { return false; } 316static inline bool pm_resume_via_firmware(void) { return false; }
317static inline bool pm_suspend_via_s2idle(void) { return false; } 317static inline bool pm_suspend_default_s2idle(void) { return false; }
318 318
319static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {} 319static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {}
320static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } 320static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 9505101ed2bc..8703b0ca4986 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -62,16 +62,16 @@ enum s2idle_states __read_mostly s2idle_state;
62static DEFINE_RAW_SPINLOCK(s2idle_lock); 62static DEFINE_RAW_SPINLOCK(s2idle_lock);
63 63
64/** 64/**
65 * pm_suspend_via_s2idle - Check if suspend-to-idle is the default suspend. 65 * pm_suspend_default_s2idle - Check if suspend-to-idle is the default suspend.
66 * 66 *
67 * Return 'true' if suspend-to-idle has been selected as the default system 67 * Return 'true' if suspend-to-idle has been selected as the default system
68 * suspend method. 68 * suspend method.
69 */ 69 */
70bool pm_suspend_via_s2idle(void) 70bool pm_suspend_default_s2idle(void)
71{ 71{
72 return mem_sleep_current == PM_SUSPEND_TO_IDLE; 72 return mem_sleep_current == PM_SUSPEND_TO_IDLE;
73} 73}
74EXPORT_SYMBOL_GPL(pm_suspend_via_s2idle); 74EXPORT_SYMBOL_GPL(pm_suspend_default_s2idle);
75 75
76void s2idle_set_ops(const struct platform_s2idle_ops *ops) 76void s2idle_set_ops(const struct platform_s2idle_ops *ops)
77{ 77{