* [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management
@ 2012-07-12 10:29 Rafael J. Wysocki
2012-07-12 15:51 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-07-12 10:29 UTC (permalink / raw)
To: Daniel Drake
Cc: ACPI Devel Mailing List, LKML, Linux PM list, Len Brown,
H. Peter Anvin, Randy Dunlap, Stephen Rothwell
From: Rafael J. Wysocki <rjw@sisk.pl>
Make the OLPC XO15 SCI driver define its resume callback through
a struct dev_pm_ops object rather than by using a legacy PM hook
in struct acpi_device_ops.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
This patch was missing from my patchset converting ACPI do the PM handling
based on struct dev_pm_ops.
If there are no objections, I'll add it to the pm-acpi branch of the
linux-pm.git tree so that it goes in along with the other changes in that
area.
Thanks,
Rafael
---
arch/x86/platform/olpc/olpc-xo15-sci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux/arch/x86/platform/olpc/olpc-xo15-sci.c
===================================================================
--- linux.orig/arch/x86/platform/olpc/olpc-xo15-sci.c
+++ linux/arch/x86/platform/olpc/olpc-xo15-sci.c
@@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_d
return 0;
}
-static int xo15_sci_resume(struct acpi_device *device)
+static int xo15_sci_resume(struct device *dev)
{
/* Enable all EC events */
olpc_ec_mask_write(EC_SCI_SRC_ALL);
@@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_d
return 0;
}
+static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
+
static const struct acpi_device_id xo15_sci_device_ids[] = {
{"XO15EC", 0},
{"", 0},
@@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv =
.ops = {
.add = xo15_sci_add,
.remove = xo15_sci_remove,
- .resume = xo15_sci_resume,
},
+ .drv.pm = &xo15_sci_pm,
};
static int __init xo15_sci_init(void)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management
2012-07-12 10:29 [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management Rafael J. Wysocki
@ 2012-07-12 15:51 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2012-07-12 15:51 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Daniel Drake, ACPI Devel Mailing List, LKML, Linux PM list,
Len Brown, H. Peter Anvin, Stephen Rothwell
On 07/12/2012 03:29 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> Make the OLPC XO15 SCI driver define its resume callback through
> a struct dev_pm_ops object rather than by using a legacy PM hook
> in struct acpi_device_ops.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> ---
>
> This patch was missing from my patchset converting ACPI do the PM handling
> based on struct dev_pm_ops.
>
> If there are no objections, I'll add it to the pm-acpi branch of the
> linux-pm.git tree so that it goes in along with the other changes in that
> area.
>
> Thanks,
> Rafael
>
> ---
> arch/x86/platform/olpc/olpc-xo15-sci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Index: linux/arch/x86/platform/olpc/olpc-xo15-sci.c
> ===================================================================
> --- linux.orig/arch/x86/platform/olpc/olpc-xo15-sci.c
> +++ linux/arch/x86/platform/olpc/olpc-xo15-sci.c
> @@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_d
> return 0;
> }
>
> -static int xo15_sci_resume(struct acpi_device *device)
> +static int xo15_sci_resume(struct device *dev)
> {
> /* Enable all EC events */
> olpc_ec_mask_write(EC_SCI_SRC_ALL);
> @@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_d
> return 0;
> }
>
> +static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
> +
> static const struct acpi_device_id xo15_sci_device_ids[] = {
> {"XO15EC", 0},
> {"", 0},
> @@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv =
> .ops = {
> .add = xo15_sci_add,
> .remove = xo15_sci_remove,
> - .resume = xo15_sci_resume,
> },
> + .drv.pm = &xo15_sci_pm,
> };
>
> static int __init xo15_sci_init(void)
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-12 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 10:29 [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management Rafael J. Wysocki
2012-07-12 15:51 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.