aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ultra45_env.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/ultra45_env.c')
-rw-r--r--drivers/hwmon/ultra45_env.c13
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
237static int __devinit env_probe(struct platform_device *op, 237static 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
265out: 264out:
@@ -278,7 +277,7 @@ out_free:
278 277
279static int __devexit env_remove(struct platform_device *op) 278static 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};
300MODULE_DEVICE_TABLE(of, env_match); 299MODULE_DEVICE_TABLE(of, env_match);
301 300
302static struct of_platform_driver env_driver = { 301static 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
312static int __init env_init(void) 311static 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
317static void __exit env_exit(void) 316static void __exit env_exit(void)
318{ 317{
319 of_unregister_platform_driver(&env_driver); 318 platform_driver_unregister(&env_driver);
320} 319}
321 320
322module_init(env_init); 321module_init(env_init);