diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/hdaps.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index 1e5dfc7805e2..3bf05d5d0c82 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -284,7 +284,7 @@ out: | |||
284 | 284 | ||
285 | /* Device model stuff */ | 285 | /* Device model stuff */ |
286 | 286 | ||
287 | static int hdaps_probe(struct device *dev) | 287 | static int hdaps_probe(struct platform_device *dev) |
288 | { | 288 | { |
289 | int ret; | 289 | int ret; |
290 | 290 | ||
@@ -296,17 +296,18 @@ static int hdaps_probe(struct device *dev) | |||
296 | return 0; | 296 | return 0; |
297 | } | 297 | } |
298 | 298 | ||
299 | static int hdaps_resume(struct device *dev) | 299 | static int hdaps_resume(struct platform_device *dev) |
300 | { | 300 | { |
301 | return hdaps_device_init(); | 301 | return hdaps_device_init(); |
302 | } | 302 | } |
303 | 303 | ||
304 | static struct device_driver hdaps_driver = { | 304 | static struct platform_driver hdaps_driver = { |
305 | .name = "hdaps", | ||
306 | .bus = &platform_bus_type, | ||
307 | .owner = THIS_MODULE, | ||
308 | .probe = hdaps_probe, | 305 | .probe = hdaps_probe, |
309 | .resume = hdaps_resume | 306 | .resume = hdaps_resume, |
307 | .driver = { | ||
308 | .name = "hdaps", | ||
309 | .owner = THIS_MODULE, | ||
310 | }, | ||
310 | }; | 311 | }; |
311 | 312 | ||
312 | /* Input class stuff */ | 313 | /* Input class stuff */ |
@@ -550,7 +551,7 @@ static int __init hdaps_init(void) | |||
550 | goto out; | 551 | goto out; |
551 | } | 552 | } |
552 | 553 | ||
553 | ret = driver_register(&hdaps_driver); | 554 | ret = platform_driver_register(&hdaps_driver); |
554 | if (ret) | 555 | if (ret) |
555 | goto out_region; | 556 | goto out_region; |
556 | 557 | ||
@@ -583,7 +584,7 @@ static int __init hdaps_init(void) | |||
583 | out_device: | 584 | out_device: |
584 | platform_device_unregister(pdev); | 585 | platform_device_unregister(pdev); |
585 | out_driver: | 586 | out_driver: |
586 | driver_unregister(&hdaps_driver); | 587 | platform_driver_unregister(&hdaps_driver); |
587 | out_region: | 588 | out_region: |
588 | release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); | 589 | release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); |
589 | out: | 590 | out: |
@@ -597,7 +598,7 @@ static void __exit hdaps_exit(void) | |||
597 | input_unregister_device(&hdaps_idev); | 598 | input_unregister_device(&hdaps_idev); |
598 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); | 599 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); |
599 | platform_device_unregister(pdev); | 600 | platform_device_unregister(pdev); |
600 | driver_unregister(&hdaps_driver); | 601 | platform_driver_unregister(&hdaps_driver); |
601 | release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); | 602 | release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); |
602 | 603 | ||
603 | printk(KERN_INFO "hdaps: driver unloaded.\n"); | 604 | printk(KERN_INFO "hdaps: driver unloaded.\n"); |