aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hdpuftrs/hdpu_cpustate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/hdpuftrs/hdpu_cpustate.c')
-rw-r--r--drivers/misc/hdpuftrs/hdpu_cpustate.c20
1 files changed, 10 insertions, 10 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
30static int hdpu_cpustate_probe(struct device *ddev); 30static int hdpu_cpustate_probe(struct platform_device *pdev);
31static int hdpu_cpustate_remove(struct device *ddev); 31static int hdpu_cpustate_remove(struct platform_device *pdev);
32 32
33struct cpustate_t cpustate; 33struct 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
162static struct device_driver hdpu_cpustate_driver = { 162static 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
191static int hdpu_cpustate_probe(struct device *ddev) 192static 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
221static int hdpu_cpustate_remove(struct device *ddev) 221static 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)
233static int __init cpustate_init(void) 233static 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
240static void __exit cpustate_exit(void) 240static void __exit cpustate_exit(void)
241{ 241{
242 driver_unregister(&hdpu_cpustate_driver); 242 platform_driver_unregister(&hdpu_cpustate_driver);
243} 243}
244 244
245module_init(cpustate_init); 245module_init(cpustate_init);