diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-25 08:39:46 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-25 13:40:12 -0400 |
commit | 11fa8da5fb14b23ff796c09d61a162a27deeb04f (patch) | |
tree | 27b62208004a18c6ae879b2589224c038058fdcb /drivers/platform | |
parent | cc8ef52707341e67a12067d6ead991d56ea017ca (diff) |
ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code
ideapad_acpi_resume() and ideapad_pm is meaningful
only if CONFIG_PM_SLEEP is set.
Thus introduce #ifdef for this piece of code.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
CC: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 89c4519d48ac..5021c55210e8 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
@@ -901,6 +901,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event) | |||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
904 | #ifdef CONFIG_PM_SLEEP | ||
904 | static int ideapad_acpi_resume(struct device *device) | 905 | static int ideapad_acpi_resume(struct device *device) |
905 | { | 906 | { |
906 | ideapad_sync_rfk_state(ideapad_priv); | 907 | ideapad_sync_rfk_state(ideapad_priv); |
@@ -909,6 +910,7 @@ static int ideapad_acpi_resume(struct device *device) | |||
909 | } | 910 | } |
910 | 911 | ||
911 | static SIMPLE_DEV_PM_OPS(ideapad_pm, NULL, ideapad_acpi_resume); | 912 | static SIMPLE_DEV_PM_OPS(ideapad_pm, NULL, ideapad_acpi_resume); |
913 | #endif | ||
912 | 914 | ||
913 | static struct acpi_driver ideapad_acpi_driver = { | 915 | static struct acpi_driver ideapad_acpi_driver = { |
914 | .name = "ideapad_acpi", | 916 | .name = "ideapad_acpi", |
@@ -917,7 +919,9 @@ static struct acpi_driver ideapad_acpi_driver = { | |||
917 | .ops.add = ideapad_acpi_add, | 919 | .ops.add = ideapad_acpi_add, |
918 | .ops.remove = ideapad_acpi_remove, | 920 | .ops.remove = ideapad_acpi_remove, |
919 | .ops.notify = ideapad_acpi_notify, | 921 | .ops.notify = ideapad_acpi_notify, |
922 | #ifdef CONFIG_PM_SLEEP | ||
920 | .drv.pm = &ideapad_pm, | 923 | .drv.pm = &ideapad_pm, |
924 | #endif | ||
921 | .owner = THIS_MODULE, | 925 | .owner = THIS_MODULE, |
922 | }; | 926 | }; |
923 | module_acpi_driver(ideapad_acpi_driver); | 927 | module_acpi_driver(ideapad_acpi_driver); |