aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-06-27 17:27:48 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-01 07:31:04 -0400
commitd69239ae5847b29ea1902b2dd86f5afa41144ba3 (patch)
tree5cac6f27dc3f7e4af5d8a83d4bd4d8ed324bad00 /drivers/platform
parenta7377419624c31d71e35485251f8548c728d5999 (diff)
toshiba_bluetooth: Use struct dev_pm_ops for power management
Make the toshiba_bluetooth 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> Reviewed-by: Vikram Dhillon <opensolarisdev@gmail.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/toshiba_bluetooth.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
index 5fb7186694df..715a43cb5e3c 100644
--- a/drivers/platform/x86/toshiba_bluetooth.c
+++ b/drivers/platform/x86/toshiba_bluetooth.c
@@ -34,7 +34,6 @@ MODULE_LICENSE("GPL");
34static int toshiba_bt_rfkill_add(struct acpi_device *device); 34static int toshiba_bt_rfkill_add(struct acpi_device *device);
35static int toshiba_bt_rfkill_remove(struct acpi_device *device, int type); 35static int toshiba_bt_rfkill_remove(struct acpi_device *device, int type);
36static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event); 36static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event);
37static int toshiba_bt_resume(struct acpi_device *device);
38 37
39static const struct acpi_device_id bt_device_ids[] = { 38static const struct acpi_device_id bt_device_ids[] = {
40 { "TOS6205", 0}, 39 { "TOS6205", 0},
@@ -42,6 +41,9 @@ static const struct acpi_device_id bt_device_ids[] = {
42}; 41};
43MODULE_DEVICE_TABLE(acpi, bt_device_ids); 42MODULE_DEVICE_TABLE(acpi, bt_device_ids);
44 43
44static int toshiba_bt_resume(struct device *dev);
45static SIMPLE_DEV_PM_OPS(toshiba_bt_pm, NULL, toshiba_bt_resume);
46
45static struct acpi_driver toshiba_bt_rfkill_driver = { 47static struct acpi_driver toshiba_bt_rfkill_driver = {
46 .name = "Toshiba BT", 48 .name = "Toshiba BT",
47 .class = "Toshiba", 49 .class = "Toshiba",
@@ -50,9 +52,9 @@ static struct acpi_driver toshiba_bt_rfkill_driver = {
50 .add = toshiba_bt_rfkill_add, 52 .add = toshiba_bt_rfkill_add,
51 .remove = toshiba_bt_rfkill_remove, 53 .remove = toshiba_bt_rfkill_remove,
52 .notify = toshiba_bt_rfkill_notify, 54 .notify = toshiba_bt_rfkill_notify,
53 .resume = toshiba_bt_resume,
54 }, 55 },
55 .owner = THIS_MODULE, 56 .owner = THIS_MODULE,
57 .drv.pm = &toshiba_bt_pm,
56}; 58};
57 59
58 60
@@ -88,9 +90,9 @@ static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event)
88 toshiba_bluetooth_enable(device->handle); 90 toshiba_bluetooth_enable(device->handle);
89} 91}
90 92
91static int toshiba_bt_resume(struct acpi_device *device) 93static int toshiba_bt_resume(struct device *dev)
92{ 94{
93 return toshiba_bluetooth_enable(device->handle); 95 return toshiba_bluetooth_enable(to_acpi_device(dev)->handle);
94} 96}
95 97
96static int toshiba_bt_rfkill_add(struct acpi_device *device) 98static int toshiba_bt_rfkill_add(struct acpi_device *device)