Commit 11fa8da5 authored by Zhang Rui's avatar Zhang Rui Committed by Rafael J. Wysocki

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: default avatarZhang Rui <rui.zhang@intel.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
CC: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent cc8ef527
...@@ -901,6 +901,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event) ...@@ -901,6 +901,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
} }
} }
#ifdef CONFIG_PM_SLEEP
static int ideapad_acpi_resume(struct device *device) static int ideapad_acpi_resume(struct device *device)
{ {
ideapad_sync_rfk_state(ideapad_priv); ideapad_sync_rfk_state(ideapad_priv);
...@@ -909,6 +910,7 @@ static int ideapad_acpi_resume(struct device *device) ...@@ -909,6 +910,7 @@ static int ideapad_acpi_resume(struct device *device)
} }
static SIMPLE_DEV_PM_OPS(ideapad_pm, NULL, ideapad_acpi_resume); static SIMPLE_DEV_PM_OPS(ideapad_pm, NULL, ideapad_acpi_resume);
#endif
static struct acpi_driver ideapad_acpi_driver = { static struct acpi_driver ideapad_acpi_driver = {
.name = "ideapad_acpi", .name = "ideapad_acpi",
...@@ -917,7 +919,9 @@ static struct acpi_driver ideapad_acpi_driver = { ...@@ -917,7 +919,9 @@ static struct acpi_driver ideapad_acpi_driver = {
.ops.add = ideapad_acpi_add, .ops.add = ideapad_acpi_add,
.ops.remove = ideapad_acpi_remove, .ops.remove = ideapad_acpi_remove,
.ops.notify = ideapad_acpi_notify, .ops.notify = ideapad_acpi_notify,
#ifdef CONFIG_PM_SLEEP
.drv.pm = &ideapad_pm, .drv.pm = &ideapad_pm,
#endif
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
module_acpi_driver(ideapad_acpi_driver); module_acpi_driver(ideapad_acpi_driver);
......
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