aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hdaps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
commit5643f000c1e10ab991182478b76550e1364c3570 (patch)
tree950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/hwmon/hdaps.c
parent177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff)
parent3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/hwmon/hdaps.c')
-rw-r--r--drivers/hwmon/hdaps.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index c8c84e0819fb..c81bd4bce1b8 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -286,7 +286,7 @@ out:
286 286
287/* Device model stuff */ 287/* Device model stuff */
288 288
289static int hdaps_probe(struct device *dev) 289static int hdaps_probe(struct platform_device *dev)
290{ 290{
291 int ret; 291 int ret;
292 292
@@ -298,17 +298,18 @@ static int hdaps_probe(struct device *dev)
298 return 0; 298 return 0;
299} 299}
300 300
301static int hdaps_resume(struct device *dev) 301static int hdaps_resume(struct platform_device *dev)
302{ 302{
303 return hdaps_device_init(); 303 return hdaps_device_init();
304} 304}
305 305
306static struct device_driver hdaps_driver = { 306static struct platform_driver hdaps_driver = {
307 .name = "hdaps",
308 .bus = &platform_bus_type,
309 .owner = THIS_MODULE,
310 .probe = hdaps_probe, 307 .probe = hdaps_probe,
311 .resume = hdaps_resume 308 .resume = hdaps_resume,
309 .driver = {
310 .name = "hdaps",
311 .owner = THIS_MODULE,
312 },
312}; 313};
313 314
314/* 315/*
@@ -540,7 +541,7 @@ static int __init hdaps_init(void)
540 goto out; 541 goto out;
541 } 542 }
542 543
543 ret = driver_register(&hdaps_driver); 544 ret = platform_driver_register(&hdaps_driver);
544 if (ret) 545 if (ret)
545 goto out_region; 546 goto out_region;
546 547
@@ -588,7 +589,7 @@ out_group:
588out_device: 589out_device:
589 platform_device_unregister(pdev); 590 platform_device_unregister(pdev);
590out_driver: 591out_driver:
591 driver_unregister(&hdaps_driver); 592 platform_driver_unregister(&hdaps_driver);
592out_region: 593out_region:
593 release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); 594 release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
594out: 595out:
@@ -602,7 +603,7 @@ static void __exit hdaps_exit(void)
602 input_unregister_device(hdaps_idev); 603 input_unregister_device(hdaps_idev);
603 sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); 604 sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
604 platform_device_unregister(pdev); 605 platform_device_unregister(pdev);
605 driver_unregister(&hdaps_driver); 606 platform_driver_unregister(&hdaps_driver);
606 release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS); 607 release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
607 608
608 printk(KERN_INFO "hdaps: driver unloaded.\n"); 609 printk(KERN_INFO "hdaps: driver unloaded.\n");