summaryrefslogtreecommitdiff
path: root/drivers/hwmon/hdaps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 09:24:26 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 09:24:26 -0800
commit5643f000c1e10ab991182478b76550e1364c3570 (patch)
tree950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/hwmon/hdaps.c
parent177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff)
parent3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff)
downloadlinux-3.10-5643f000c1e10ab991182478b76550e1364c3570.tar.gz
linux-3.10-5643f000c1e10ab991182478b76550e1364c3570.tar.bz2
linux-3.10-5643f000c1e10ab991182478b76550e1364c3570.zip
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 c8c84e0819f..c81bd4bce1b 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -286,7 +286,7 @@ out:
/* Device model stuff */
-static int hdaps_probe(struct device *dev)
+static int hdaps_probe(struct platform_device *dev)
{
int ret;
@@ -298,17 +298,18 @@ static int hdaps_probe(struct device *dev)
return 0;
}
-static int hdaps_resume(struct device *dev)
+static int hdaps_resume(struct platform_device *dev)
{
return hdaps_device_init();
}
-static struct device_driver hdaps_driver = {
- .name = "hdaps",
- .bus = &platform_bus_type,
- .owner = THIS_MODULE,
+static struct platform_driver hdaps_driver = {
.probe = hdaps_probe,
- .resume = hdaps_resume
+ .resume = hdaps_resume,
+ .driver = {
+ .name = "hdaps",
+ .owner = THIS_MODULE,
+ },
};
/*
@@ -540,7 +541,7 @@ static int __init hdaps_init(void)
goto out;
}
- ret = driver_register(&hdaps_driver);
+ ret = platform_driver_register(&hdaps_driver);
if (ret)
goto out_region;
@@ -588,7 +589,7 @@ out_group:
out_device:
platform_device_unregister(pdev);
out_driver:
- driver_unregister(&hdaps_driver);
+ platform_driver_unregister(&hdaps_driver);
out_region:
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
out:
@@ -602,7 +603,7 @@ static void __exit hdaps_exit(void)
input_unregister_device(hdaps_idev);
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
platform_device_unregister(pdev);
- driver_unregister(&hdaps_driver);
+ platform_driver_unregister(&hdaps_driver);
release_region(HDAPS_LOW_PORT, HDAPS_NR_PORTS);
printk(KERN_INFO "hdaps: driver unloaded.\n");