aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
77 } 77 }
78} 78}
79 79
80static int ebook_switch_resume(struct acpi_device *device) 80static int ebook_switch_resume(struct device *dev)
81{ 81{
82 return ebook_send_state(device); 82 return ebook_send_state(to_acpi_device(dev));
83} 83}
84 84
85static SIMPLE_DEV_PM_OPS(ebook_switch_pm, NULL, ebook_switch_resume);
86
85static int ebook_switch_add(struct acpi_device *device) 87static int ebook_switch_add(struct acpi_device *device)
86{ 88{
87 struct ebook_switch *button; 89 struct ebook_switch *button;
@@ -161,10 +163,10 @@ static struct acpi_driver xo15_ebook_driver = {
161 .ids = ebook_device_ids, 163 .ids = ebook_device_ids,
162 .ops = { 164 .ops = {
163 .add = ebook_switch_add, 165 .add = ebook_switch_add,
164 .resume = ebook_switch_resume,
165 .remove = ebook_switch_remove, 166 .remove = ebook_switch_remove,
166 .notify = ebook_switch_notify, 167 .notify = ebook_switch_notify,
167 }, 168 },
169 .drv.pm = &ebook_switch_pm,
168}; 170};
169 171
170static int __init xo15_ebook_init(void) 172static int __init xo15_ebook_init(void)