diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_cpustate.c | 20 | ||||
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_nexus.c | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index 9c4dd682ac74..226a7cd4ee3d 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | #define SKY_CPUSTATE_VERSION "1.1" | 28 | #define SKY_CPUSTATE_VERSION "1.1" |
29 | 29 | ||
30 | static int hdpu_cpustate_probe(struct device *ddev); | 30 | static int hdpu_cpustate_probe(struct platform_device *pdev); |
31 | static int hdpu_cpustate_remove(struct device *ddev); | 31 | static int hdpu_cpustate_remove(struct platform_device *pdev); |
32 | 32 | ||
33 | struct cpustate_t cpustate; | 33 | struct cpustate_t cpustate; |
34 | 34 | ||
@@ -159,11 +159,12 @@ static int cpustate_read_proc(char *page, char **start, off_t off, | |||
159 | return len; | 159 | return len; |
160 | } | 160 | } |
161 | 161 | ||
162 | static struct device_driver hdpu_cpustate_driver = { | 162 | static struct platform_driver hdpu_cpustate_driver = { |
163 | .name = HDPU_CPUSTATE_NAME, | ||
164 | .bus = &platform_bus_type, | ||
165 | .probe = hdpu_cpustate_probe, | 163 | .probe = hdpu_cpustate_probe, |
166 | .remove = hdpu_cpustate_remove, | 164 | .remove = hdpu_cpustate_remove, |
165 | .driver = { | ||
166 | .name = HDPU_CPUSTATE_NAME, | ||
167 | }, | ||
167 | }; | 168 | }; |
168 | 169 | ||
169 | /* | 170 | /* |
@@ -188,9 +189,8 @@ static struct miscdevice cpustate_dev = { | |||
188 | &cpustate_fops | 189 | &cpustate_fops |
189 | }; | 190 | }; |
190 | 191 | ||
191 | static int hdpu_cpustate_probe(struct device *ddev) | 192 | static int hdpu_cpustate_probe(struct platform_device *pdev) |
192 | { | 193 | { |
193 | struct platform_device *pdev = to_platform_device(ddev); | ||
194 | struct resource *res; | 194 | struct resource *res; |
195 | struct proc_dir_entry *proc_de; | 195 | struct proc_dir_entry *proc_de; |
196 | int ret; | 196 | int ret; |
@@ -218,7 +218,7 @@ static int hdpu_cpustate_probe(struct device *ddev) | |||
218 | return 0; | 218 | return 0; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int hdpu_cpustate_remove(struct device *ddev) | 221 | static int hdpu_cpustate_remove(struct platform_device *pdev) |
222 | { | 222 | { |
223 | 223 | ||
224 | cpustate.set_addr = NULL; | 224 | cpustate.set_addr = NULL; |
@@ -233,13 +233,13 @@ static int hdpu_cpustate_remove(struct device *ddev) | |||
233 | static int __init cpustate_init(void) | 233 | static int __init cpustate_init(void) |
234 | { | 234 | { |
235 | int rc; | 235 | int rc; |
236 | rc = driver_register(&hdpu_cpustate_driver); | 236 | rc = platform_driver_register(&hdpu_cpustate_driver); |
237 | return rc; | 237 | return rc; |
238 | } | 238 | } |
239 | 239 | ||
240 | static void __exit cpustate_exit(void) | 240 | static void __exit cpustate_exit(void) |
241 | { | 241 | { |
242 | driver_unregister(&hdpu_cpustate_driver); | 242 | platform_driver_unregister(&hdpu_cpustate_driver); |
243 | } | 243 | } |
244 | 244 | ||
245 | module_init(cpustate_init); | 245 | module_init(cpustate_init); |
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 | ||
26 | static int hdpu_nexus_probe(struct device *ddev); | 26 | static int hdpu_nexus_probe(struct platform_device *pdev); |
27 | static int hdpu_nexus_remove(struct device *ddev); | 27 | static int hdpu_nexus_remove(struct platform_device *pdev); |
28 | 28 | ||
29 | static struct proc_dir_entry *hdpu_slot_id; | 29 | static struct proc_dir_entry *hdpu_slot_id; |
30 | static struct proc_dir_entry *hdpu_chassis_id; | 30 | static struct proc_dir_entry *hdpu_chassis_id; |
31 | static int slot_id = -1; | 31 | static int slot_id = -1; |
32 | static int chassis_id = -1; | 32 | static int chassis_id = -1; |
33 | 33 | ||
34 | static struct device_driver hdpu_nexus_driver = { | 34 | static 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 | ||
41 | int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, | 42 | int 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 | ||
59 | static int hdpu_nexus_probe(struct device *ddev) | 60 | static 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 | ||
84 | static int hdpu_nexus_remove(struct device *ddev) | 84 | static 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) | |||
95 | static int __init nexus_init(void) | 95 | static 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 | ||
102 | static void __exit nexus_exit(void) | 102 | static void __exit nexus_exit(void) |
103 | { | 103 | { |
104 | driver_unregister(&hdpu_nexus_driver); | 104 | platform_driver_unregister(&hdpu_nexus_driver); |
105 | } | 105 | } |
106 | 106 | ||
107 | module_init(nexus_init); | 107 | module_init(nexus_init); |