]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: tlv320dac33: Use module_i2c_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 6 Aug 2012 11:55:44 +0000 (17:25 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Aug 2012 14:20:32 +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/tlv320dac33.c

index 0dd41077ab79eab0daf001111a5248ac17ee98f2..d2e16c5d7d1f71ca5d4425e7c6d8a83dc7bcb7ec 100644 (file)
@@ -1621,24 +1621,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = {
        .id_table       = tlv320dac33_i2c_id,
 };
 
-static int __init dac33_module_init(void)
-{
-       int r;
-       r = i2c_add_driver(&tlv320dac33_i2c_driver);
-       if (r < 0) {
-               printk(KERN_ERR "DAC33: driver registration failed\n");
-               return r;
-       }
-       return 0;
-}
-module_init(dac33_module_init);
-
-static void __exit dac33_module_exit(void)
-{
-       i2c_del_driver(&tlv320dac33_i2c_driver);
-}
-module_exit(dac33_module_exit);
-
+module_i2c_driver(tlv320dac33_i2c_driver);
 
 MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver");
 MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");