i2c: taos-evm: Use module_serio_driver()
authorChristoph Jaeger <christophjaeger@linux.com>
Fri, 13 Jun 2014 19:52:24 +0000 (21:52 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 27 Jun 2014 12:50:42 +0000 (14:50 +0200)
Get rid of some boilerplate code by using module_serio_driver().

Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-taos-evm.c

index 057602683553dc132d01e191af875378573909b1..10855a0b7e7fe181c6fbc2ecb7baddbc1ef99f80 100644 (file)
@@ -311,19 +311,8 @@ static struct serio_driver taos_drv = {
        .interrupt      = taos_interrupt,
 };
 
-static int __init taos_init(void)
-{
-       return serio_register_driver(&taos_drv);
-}
-
-static void __exit taos_exit(void)
-{
-       serio_unregister_driver(&taos_drv);
-}
+module_serio_driver(taos_drv);
 
 MODULE_AUTHOR("Jean Delvare <jdelvare@suse.de>");
 MODULE_DESCRIPTION("TAOS evaluation module driver");
 MODULE_LICENSE("GPL");
-
-module_init(taos_init);
-module_exit(taos_exit);