staging: cptm1217: use module_i2c_driver macro
authorDevendra Naga <devendra.aaru@gmail.com>
Sat, 25 Aug 2012 21:05:47 +0000 (02:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 21:23:33 +0000 (14:23 -0700)
use the module_i2c_driver and remove the reimplementation of module_i2c_driver

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/cptm1217/clearpad_tm1217.c

index 0d924d3a2ab1922797f25b8b3298811f205f6aca..a49b0da60049eb05043e7f5129e90a46b40a6621 100644 (file)
@@ -658,18 +658,7 @@ static struct i2c_driver cp_tm1217_driver = {
        .resume     = cp_tm1217_resume,
 };
 
-static int __init clearpad_tm1217_init(void)
-{
-       return i2c_add_driver(&cp_tm1217_driver);
-}
-
-static void __exit clearpad_tm1217_exit(void)
-{
-       i2c_del_driver(&cp_tm1217_driver);
-}
-
-module_init(clearpad_tm1217_init);
-module_exit(clearpad_tm1217_exit);
+module_i2c_driver(cp_tm1217_driver);
 
 MODULE_AUTHOR("Ramesh Agarwal <ramesh.agarwal@intel.com>");
 MODULE_DESCRIPTION("Synaptics TM1217 TouchScreen Driver");