diff options
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r-- | drivers/char/sonypi.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index d05067dcea01..51a07370e636 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1168,7 +1168,7 @@ static int sonypi_disable(void) | |||
1168 | #ifdef CONFIG_PM | 1168 | #ifdef CONFIG_PM |
1169 | static int old_camera_power; | 1169 | static int old_camera_power; |
1170 | 1170 | ||
1171 | static int sonypi_suspend(struct device *dev, pm_message_t state) | 1171 | static int sonypi_suspend(struct platform_device *dev, pm_message_t state) |
1172 | { | 1172 | { |
1173 | old_camera_power = sonypi_device.camera_power; | 1173 | old_camera_power = sonypi_device.camera_power; |
1174 | sonypi_disable(); | 1174 | sonypi_disable(); |
@@ -1176,26 +1176,27 @@ static int sonypi_suspend(struct device *dev, pm_message_t state) | |||
1176 | return 0; | 1176 | return 0; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | static int sonypi_resume(struct device *dev) | 1179 | static int sonypi_resume(struct platform_device *dev) |
1180 | { | 1180 | { |
1181 | sonypi_enable(old_camera_power); | 1181 | sonypi_enable(old_camera_power); |
1182 | return 0; | 1182 | return 0; |
1183 | } | 1183 | } |
1184 | #endif | 1184 | #endif |
1185 | 1185 | ||
1186 | static void sonypi_shutdown(struct device *dev) | 1186 | static void sonypi_shutdown(struct platform_device *dev) |
1187 | { | 1187 | { |
1188 | sonypi_disable(); | 1188 | sonypi_disable(); |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | static struct device_driver sonypi_driver = { | 1191 | static struct platform_driver sonypi_driver = { |
1192 | .name = "sonypi", | ||
1193 | .bus = &platform_bus_type, | ||
1194 | #ifdef CONFIG_PM | 1192 | #ifdef CONFIG_PM |
1195 | .suspend = sonypi_suspend, | 1193 | .suspend = sonypi_suspend, |
1196 | .resume = sonypi_resume, | 1194 | .resume = sonypi_resume, |
1197 | #endif | 1195 | #endif |
1198 | .shutdown = sonypi_shutdown, | 1196 | .shutdown = sonypi_shutdown, |
1197 | .driver = { | ||
1198 | .name = "sonypi", | ||
1199 | }, | ||
1199 | }; | 1200 | }; |
1200 | 1201 | ||
1201 | static int __devinit sonypi_create_input_devices(void) | 1202 | static int __devinit sonypi_create_input_devices(void) |
@@ -1455,20 +1456,20 @@ static int __init sonypi_init(void) | |||
1455 | if (!dmi_check_system(sonypi_dmi_table)) | 1456 | if (!dmi_check_system(sonypi_dmi_table)) |
1456 | return -ENODEV; | 1457 | return -ENODEV; |
1457 | 1458 | ||
1458 | ret = driver_register(&sonypi_driver); | 1459 | ret = platform_driver_register(&sonypi_driver); |
1459 | if (ret) | 1460 | if (ret) |
1460 | return ret; | 1461 | return ret; |
1461 | 1462 | ||
1462 | ret = sonypi_probe(); | 1463 | ret = sonypi_probe(); |
1463 | if (ret) | 1464 | if (ret) |
1464 | driver_unregister(&sonypi_driver); | 1465 | platform_driver_unregister(&sonypi_driver); |
1465 | 1466 | ||
1466 | return ret; | 1467 | return ret; |
1467 | } | 1468 | } |
1468 | 1469 | ||
1469 | static void __exit sonypi_exit(void) | 1470 | static void __exit sonypi_exit(void) |
1470 | { | 1471 | { |
1471 | driver_unregister(&sonypi_driver); | 1472 | platform_driver_unregister(&sonypi_driver); |
1472 | sonypi_remove(); | 1473 | sonypi_remove(); |
1473 | } | 1474 | } |
1474 | 1475 | ||