From: joeyli <jlee@suse.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: platform-driver-x86@vger.kernel.org,
Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Matthew Garrett <mjg59@srcf.ucam.org>, Joey Lee <jlee@novell.com>
Subject: Re: [PATCH 3/5] acer-wmi: Use struct dev_pm_ops for power management
Date: Mon, 18 Jun 2012 14:56:38 +0800 [thread overview]
Message-ID: <1340002598.6640.7.camel@linux-s257.site> (raw)
In-Reply-To: <201206172228.59364.rjw@sisk.pl>
於 日,2012-06-17 於 22:28 +0200,Rafael J. Wysocki 提到:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> Make the acer-wmi driver define its PM callbacks through
> a struct dev_pm_ops object rather than by using legacy PM hooks
> in struct platform_driver.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Patch good to me!
Tested on Acer TravelMate 4750
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Thanks a lot!
Joey Lee
> ---
> drivers/platform/x86/acer-wmi.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> Index: linux/drivers/platform/x86/acer-wmi.c
> ===================================================================
> --- linux.orig/drivers/platform/x86/acer-wmi.c
> +++ linux/drivers/platform/x86/acer-wmi.c
> @@ -1877,8 +1877,7 @@ static int acer_platform_remove(struct p
> return 0;
> }
>
> -static int acer_platform_suspend(struct platform_device *dev,
> -pm_message_t state)
> +static int acer_suspend(struct device *dev)
> {
> u32 value;
> struct acer_data *data = &interface->data;
> @@ -1900,7 +1899,7 @@ pm_message_t state)
> return 0;
> }
>
> -static int acer_platform_resume(struct platform_device *device)
> +static int acer_resume(struct device *dev)
> {
> struct acer_data *data = &interface->data;
>
> @@ -1916,6 +1915,8 @@ static int acer_platform_resume(struct p
> return 0;
> }
>
> +static SIMPLE_DEV_PM_OPS(acer_pm, acer_suspend, acer_resume);
> +
> static void acer_platform_shutdown(struct platform_device *device)
> {
> struct acer_data *data = &interface->data;
> @@ -1931,11 +1932,10 @@ static struct platform_driver acer_platf
> .driver = {
> .name = "acer-wmi",
> .owner = THIS_MODULE,
> + .pm = &acer_pm,
> },
> .probe = acer_platform_probe,
> .remove = acer_platform_remove,
> - .suspend = acer_platform_suspend,
> - .resume = acer_platform_resume,
> .shutdown = acer_platform_shutdown,
> };
>
>
>
next prev parent reply other threads:[~2012-06-18 6:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-17 20:26 [PATCH 0/5] platform / x86: Convert a few drivers to struct dev_pm_ops Rafael J. Wysocki
2012-06-17 20:27 ` [PATCH 1/5] thinkpad_acpi: Drop pm_message_t arguments from suspend routines Rafael J. Wysocki
2012-06-24 0:32 ` Henrique de Moraes Holschuh
2012-06-17 20:27 ` [PATCH 2/5] thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines Rafael J. Wysocki
2012-06-24 0:34 ` Henrique de Moraes Holschuh
2012-06-24 20:01 ` Rafael J. Wysocki
2012-06-17 20:28 ` [PATCH 3/5] acer-wmi: Use struct dev_pm_ops for power management Rafael J. Wysocki
2012-06-18 6:56 ` joeyli [this message]
2012-06-17 20:29 ` [PATCH 4/5] intel_mid_thermal: " Rafael J. Wysocki
2012-06-18 6:03 ` R, Durgadoss
2012-06-17 20:30 ` [PATCH 5/5] intel_ips: Remove empty legacy PM callbacks Rafael J. Wysocki
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=1340002598.6640.7.camel@linux-s257.site \
--to=jlee@suse.com \
--cc=ibm-acpi@hmh.eng.br \
--cc=jlee@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--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