summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-06-27 23:27:55 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-01 13:31:05 +0200
commit44cb98c48e19f506e178c519f5da2c23a156e002 (patch)
treec705a632acdc63485ac55e6a741a48c49465891f
parenttoshiba_bluetooth: Use struct dev_pm_ops for power management (diff)
downloadlinux-44cb98c48e19f506e178c519f5da2c23a156e002.tar.xz
linux-44cb98c48e19f506e178c519f5da2c23a156e002.zip
xo15-ebook: Use struct dev_pm_ops for power management
Make the xo15-ebook driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--drivers/platform/x86/xo15-ebook.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/platform/x86/xo15-ebook.c b/drivers/platform/x86/xo15-ebook.c
index fad153dc0355..849c07c13bf6 100644
--- a/drivers/platform/x86/xo15-ebook.c
+++ b/drivers/platform/x86/xo15-ebook.c
@@ -77,11 +77,13 @@ static void ebook_switch_notify(struct acpi_device *device, u32 event)
}
}
-static int ebook_switch_resume(struct acpi_device *device)
+static int ebook_switch_resume(struct device *dev)
{
- return ebook_send_state(device);
+ return ebook_send_state(to_acpi_device(dev));
}
+static SIMPLE_DEV_PM_OPS(ebook_switch_pm, NULL, ebook_switch_resume);
+
static int ebook_switch_add(struct acpi_device *device)
{
struct ebook_switch *button;
@@ -161,10 +163,10 @@ static struct acpi_driver xo15_ebook_driver = {
.ids = ebook_device_ids,
.ops = {
.add = ebook_switch_add,
- .resume = ebook_switch_resume,
.remove = ebook_switch_remove,
.notify = ebook_switch_notify,
},
+ .drv.pm = &ebook_switch_pm,
};
static int __init xo15_ebook_init(void)