Commit 18468843 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
parent d91ee328
...@@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_device *device, int type) ...@@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_device *device, int type)
return 0; return 0;
} }
static int xo15_sci_resume(struct acpi_device *device) static int xo15_sci_resume(struct device *dev)
{ {
/* Enable all EC events */ /* Enable all EC events */
olpc_ec_mask_write(EC_SCI_SRC_ALL); olpc_ec_mask_write(EC_SCI_SRC_ALL);
...@@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_device *device) ...@@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_device *device)
return 0; return 0;
} }
static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
static const struct acpi_device_id xo15_sci_device_ids[] = { static const struct acpi_device_id xo15_sci_device_ids[] = {
{"XO15EC", 0}, {"XO15EC", 0},
{"", 0}, {"", 0},
...@@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv = { ...@@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv = {
.ops = { .ops = {
.add = xo15_sci_add, .add = xo15_sci_add,
.remove = xo15_sci_remove, .remove = xo15_sci_remove,
.resume = xo15_sci_resume,
}, },
.drv.pm = &xo15_sci_pm,
}; };
static int __init xo15_sci_init(void) static int __init xo15_sci_init(void)
......
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