From: Zhang Rui <rui.zhang@intel.com>
To: rjw@sisk.pl
Cc: linux-pm@vger.kernel.org, Zhang Rui <rui.zhang@intel.com>,
Matthew Garrett <matthew.garrett@nebula.com>,
Ike Panhc <ike.pan@canonical.com>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH 2/6] ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code
Date: Mon, 23 Sep 2013 15:50:47 +0800 [thread overview]
Message-ID: <1379922651-5578-3-git-send-email-rui.zhang@intel.com> (raw)
In-Reply-To: <1379922651-5578-1-git-send-email-rui.zhang@intel.com>
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>
CC: platform-driver-x86@vger.kernel.org
---
drivers/platform/x86/ideapad-laptop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 89c4519..5021c55 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)
}
}
+#ifdef CONFIG_PM_SLEEP
static int ideapad_acpi_resume(struct device *device)
{
ideapad_sync_rfk_state(ideapad_priv);
@@ -909,6 +910,7 @@ static int ideapad_acpi_resume(struct device *device)
}
static SIMPLE_DEV_PM_OPS(ideapad_pm, NULL, ideapad_acpi_resume);
+#endif
static struct acpi_driver ideapad_acpi_driver = {
.name = "ideapad_acpi",
@@ -917,7 +919,9 @@ static struct acpi_driver ideapad_acpi_driver = {
.ops.add = ideapad_acpi_add,
.ops.remove = ideapad_acpi_remove,
.ops.notify = ideapad_acpi_notify,
+#ifdef CONFIG_PM_SLEEP
.drv.pm = &ideapad_pm,
+#endif
.owner = THIS_MODULE,
};
module_acpi_driver(ideapad_acpi_driver);
--
1.7.9.5
next prev parent reply other threads:[~2013-09-23 7:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 7:50 [PATCH 0/6] ACPI bus conversion Zhang Rui
2013-09-23 7:50 ` [PATCH 1/6] ACPI ac: convert ACPI ac driver to platform bus Zhang Rui
2013-09-23 7:50 ` Zhang Rui [this message]
2013-09-23 7:50 ` [PATCH 3/6] ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structure Zhang Rui
2013-09-23 7:50 ` [PATCH 4/6] ideapad_laptop: convert internal function calls to use ideapad_private as parameter Zhang Rui
2013-09-23 7:50 ` [PATCH 5/6] ideapad_laptop: remove ideapad_handle and ideapad_priv Zhang Rui
2013-09-23 7:50 ` [PATCH 6/6] ideapad_laptop: convert ideapad device/driver to platform bus Zhang Rui
2013-09-23 23:24 ` [PATCH 0/6] ACPI bus conversion Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2013-09-25 12:39 Zhang Rui
2013-09-25 12:39 ` [PATCH 2/6] ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code Zhang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379922651-5578-3-git-send-email-rui.zhang@intel.com \
--to=rui.zhang@intel.com \
--cc=ike.pan@canonical.com \
--cc=linux-pm@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).