diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-12 16:36:28 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-12 16:36:28 -0400 |
commit | 18468843fac331dfbb700901c8012d17373adfec (patch) | |
tree | ead0ab9f99fb1d60c65ea1c56b538a7455814e46 | |
parent | d91ee328c1e8b3992ffbf84a1a984c2a7f4ebff7 (diff) |
olpc-xo15-sci: Use struct dev_pm_ops for power management
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.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
-rw-r--r-- | arch/x86/platform/olpc/olpc-xo15-sci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c index 23e5b9d7977b..599be499fdf7 100644 --- a/arch/x86/platform/olpc/olpc-xo15-sci.c +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c | |||
@@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_device *device, int type) | |||
203 | return 0; | 203 | return 0; |
204 | } | 204 | } |
205 | 205 | ||
206 | static int xo15_sci_resume(struct acpi_device *device) | 206 | static int xo15_sci_resume(struct device *dev) |
207 | { | 207 | { |
208 | /* Enable all EC events */ | 208 | /* Enable all EC events */ |
209 | olpc_ec_mask_write(EC_SCI_SRC_ALL); | 209 | olpc_ec_mask_write(EC_SCI_SRC_ALL); |
@@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_device *device) | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | 217 | ||
218 | static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume); | ||
219 | |||
218 | static const struct acpi_device_id xo15_sci_device_ids[] = { | 220 | static const struct acpi_device_id xo15_sci_device_ids[] = { |
219 | {"XO15EC", 0}, | 221 | {"XO15EC", 0}, |
220 | {"", 0}, | 222 | {"", 0}, |
@@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv = { | |||
227 | .ops = { | 229 | .ops = { |
228 | .add = xo15_sci_add, | 230 | .add = xo15_sci_add, |
229 | .remove = xo15_sci_remove, | 231 | .remove = xo15_sci_remove, |
230 | .resume = xo15_sci_resume, | ||
231 | }, | 232 | }, |
233 | .drv.pm = &xo15_sci_pm, | ||
232 | }; | 234 | }; |
233 | 235 | ||
234 | static int __init xo15_sci_init(void) | 236 | static int __init xo15_sci_init(void) |