aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hdpuftrs/hdpu_nexus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/hdpuftrs/hdpu_nexus.c')
-rw-r--r--drivers/misc/hdpuftrs/hdpu_nexus.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c
index 165f3405df27..21da8a6ff8a1 100644
--- a/drivers/misc/hdpuftrs/hdpu_nexus.c
+++ b/drivers/misc/hdpuftrs/hdpu_nexus.c
@@ -23,19 +23,20 @@
23 23
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25 25
26static int hdpu_nexus_probe(struct device *ddev); 26static int hdpu_nexus_probe(struct platform_device *pdev);
27static int hdpu_nexus_remove(struct device *ddev); 27static int hdpu_nexus_remove(struct platform_device *pdev);
28 28
29static struct proc_dir_entry *hdpu_slot_id; 29static struct proc_dir_entry *hdpu_slot_id;
30static struct proc_dir_entry *hdpu_chassis_id; 30static struct proc_dir_entry *hdpu_chassis_id;
31static int slot_id = -1; 31static int slot_id = -1;
32static int chassis_id = -1; 32static int chassis_id = -1;
33 33
34static struct device_driver hdpu_nexus_driver = { 34static struct platform_driver hdpu_nexus_driver = {
35 .name = HDPU_NEXUS_NAME,
36 .bus = &platform_bus_type,
37 .probe = hdpu_nexus_probe, 35 .probe = hdpu_nexus_probe,
38 .remove = hdpu_nexus_remove, 36 .remove = hdpu_nexus_remove,
37 .driver = {
38 .name = HDPU_NEXUS_NAME,
39 },
39}; 40};
40 41
41int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, 42int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset,
@@ -56,9 +57,8 @@ int hdpu_chassis_id_read(char *buffer, char **buffer_location, off_t offset,
56 return sprintf(buffer, "%d\n", chassis_id); 57 return sprintf(buffer, "%d\n", chassis_id);
57} 58}
58 59
59static int hdpu_nexus_probe(struct device *ddev) 60static int hdpu_nexus_probe(struct platform_device *pdev)
60{ 61{
61 struct platform_device *pdev = to_platform_device(ddev);
62 struct resource *res; 62 struct resource *res;
63 63
64 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 64 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -81,7 +81,7 @@ static int hdpu_nexus_probe(struct device *ddev)
81 return 0; 81 return 0;
82} 82}
83 83
84static int hdpu_nexus_remove(struct device *ddev) 84static int hdpu_nexus_remove(struct platform_device *pdev)
85{ 85{
86 slot_id = -1; 86 slot_id = -1;
87 chassis_id = -1; 87 chassis_id = -1;
@@ -95,13 +95,13 @@ static int hdpu_nexus_remove(struct device *ddev)
95static int __init nexus_init(void) 95static int __init nexus_init(void)
96{ 96{
97 int rc; 97 int rc;
98 rc = driver_register(&hdpu_nexus_driver); 98 rc = platform_driver_register(&hdpu_nexus_driver);
99 return rc; 99 return rc;
100} 100}
101 101
102static void __exit nexus_exit(void) 102static void __exit nexus_exit(void)
103{ 103{
104 driver_unregister(&hdpu_nexus_driver); 104 platform_driver_unregister(&hdpu_nexus_driver);
105} 105}
106 106
107module_init(nexus_init); 107module_init(nexus_init);