ASoC: tpa6130a2: Use module_i2c_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 6 Aug 2012 11:55:38 +0000 (17:25 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Aug 2012 14:20:36 +0000 (15:20 +0100)
module_i2c_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/tpa6130a2.c

index 6fe4aa3ac54401da4210df65ead54e0a1fe537b2..565ff39ad3a35ced5598c9532bc33b85f1d8983a 100644 (file)
@@ -487,19 +487,8 @@ static struct i2c_driver tpa6130a2_i2c_driver = {
        .id_table = tpa6130a2_id,
 };
 
-static int __init tpa6130a2_init(void)
-{
-       return i2c_add_driver(&tpa6130a2_i2c_driver);
-}
-
-static void __exit tpa6130a2_exit(void)
-{
-       i2c_del_driver(&tpa6130a2_i2c_driver);
-}
+module_i2c_driver(tpa6130a2_i2c_driver);
 
 MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
 MODULE_DESCRIPTION("TPA6130A2 Headphone amplifier driver");
 MODULE_LICENSE("GPL");
-
-module_init(tpa6130a2_init);
-module_exit(tpa6130a2_exit);