diff options
Diffstat (limited to 'drivers/sbus/char/envctrl.c')
| -rw-r--r-- | drivers/sbus/char/envctrl.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 8ce414e3948..af15a2fdab5 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -19,7 +19,6 @@ */ #include <linux/module.h> -#include <linux/init.h> #include <linux/kthread.h> #include <linux/delay.h> #include <linux/ioport.h> @@ -353,7 +352,7 @@ static int envctrl_i2c_data_translate(unsigned char data, int translate_type, default: break; - }; + } return len; } @@ -644,7 +643,7 @@ envctrl_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) default: break; - }; + } return ret; } @@ -687,7 +686,7 @@ envctrl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) default: return -EINVAL; - }; + } return 0; } @@ -947,7 +946,7 @@ static void envctrl_init_i2c_child(struct device_node *dp, default: break; - }; + } } } @@ -1028,8 +1027,7 @@ static int kenvctrld(void *__unused) return 0; } -static int __devinit envctrl_probe(struct platform_device *op, - const struct of_device_id *match) +static int envctrl_probe(struct platform_device *op) { struct device_node *dp; int index, err; @@ -1105,7 +1103,7 @@ out_iounmap: return err; } -static int __devexit envctrl_remove(struct platform_device *op) +static int envctrl_remove(struct platform_device *op) { int index; @@ -1129,26 +1127,16 @@ static const struct of_device_id envctrl_match[] = { }; MODULE_DEVICE_TABLE(of, envctrl_match); -static struct of_platform_driver envctrl_driver = { +static struct platform_driver envctrl_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, .of_match_table = envctrl_match, }, .probe = envctrl_probe, - .remove = __devexit_p(envctrl_remove), + .remove = envctrl_remove, }; -static int __init envctrl_init(void) -{ - return of_register_platform_driver(&envctrl_driver); -} - -static void __exit envctrl_exit(void) -{ - of_unregister_platform_driver(&envctrl_driver); -} +module_platform_driver(envctrl_driver); -module_init(envctrl_init); -module_exit(envctrl_exit); MODULE_LICENSE("GPL"); |
