diff options
Diffstat (limited to 'drivers/hwmon/ultra45_env.c')
-rw-r--r-- | drivers/hwmon/ultra45_env.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index d863e13a50b8..27a62711e0a6 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
@@ -234,8 +234,7 @@ static const struct attribute_group env_group = { | |||
234 | .attrs = env_attributes, | 234 | .attrs = env_attributes, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | static int __devinit env_probe(struct platform_device *op, | 237 | static int __devinit env_probe(struct platform_device *op) |
238 | const struct of_device_id *match) | ||
239 | { | 238 | { |
240 | struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); | 239 | struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); |
241 | int err = -ENOMEM; | 240 | int err = -ENOMEM; |
@@ -259,7 +258,7 @@ static int __devinit env_probe(struct platform_device *op, | |||
259 | goto out_sysfs_remove_group; | 258 | goto out_sysfs_remove_group; |
260 | } | 259 | } |
261 | 260 | ||
262 | dev_set_drvdata(&op->dev, p); | 261 | platform_set_drvdata(op, p); |
263 | err = 0; | 262 | err = 0; |
264 | 263 | ||
265 | out: | 264 | out: |
@@ -278,7 +277,7 @@ out_free: | |||
278 | 277 | ||
279 | static int __devexit env_remove(struct platform_device *op) | 278 | static int __devexit env_remove(struct platform_device *op) |
280 | { | 279 | { |
281 | struct env *p = dev_get_drvdata(&op->dev); | 280 | struct env *p = platform_get_drvdata(op); |
282 | 281 | ||
283 | if (p) { | 282 | if (p) { |
284 | sysfs_remove_group(&op->dev.kobj, &env_group); | 283 | sysfs_remove_group(&op->dev.kobj, &env_group); |
@@ -299,7 +298,7 @@ static const struct of_device_id env_match[] = { | |||
299 | }; | 298 | }; |
300 | MODULE_DEVICE_TABLE(of, env_match); | 299 | MODULE_DEVICE_TABLE(of, env_match); |
301 | 300 | ||
302 | static struct of_platform_driver env_driver = { | 301 | static struct platform_driver env_driver = { |
303 | .driver = { | 302 | .driver = { |
304 | .name = "ultra45_env", | 303 | .name = "ultra45_env", |
305 | .owner = THIS_MODULE, | 304 | .owner = THIS_MODULE, |
@@ -311,12 +310,12 @@ static struct of_platform_driver env_driver = { | |||
311 | 310 | ||
312 | static int __init env_init(void) | 311 | static int __init env_init(void) |
313 | { | 312 | { |
314 | return of_register_platform_driver(&env_driver); | 313 | return platform_driver_register(&env_driver); |
315 | } | 314 | } |
316 | 315 | ||
317 | static void __exit env_exit(void) | 316 | static void __exit env_exit(void) |
318 | { | 317 | { |
319 | of_unregister_platform_driver(&env_driver); | 318 | platform_driver_unregister(&env_driver); |
320 | } | 319 | } |
321 | 320 | ||
322 | module_init(env_init); | 321 | module_init(env_init); |