mfd: Convert wm8994 to module_i2c_driver()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 7 May 2012 09:03:23 +0000 (10:03 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 7 May 2012 09:32:09 +0000 (11:32 +0200)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm8994-core.c

index 60e617549eddd0e35da9af1999ebd978ea64bc9e..1e321d349777199dad0bdd050288f72af60917a6 100644 (file)
@@ -733,23 +733,7 @@ static struct i2c_driver wm8994_i2c_driver = {
        .id_table = wm8994_i2c_id,
 };
 
-static int __init wm8994_i2c_init(void)
-{
-       int ret;
-
-       ret = i2c_add_driver(&wm8994_i2c_driver);
-       if (ret != 0)
-               pr_err("Failed to register wm8994 I2C driver: %d\n", ret);
-
-       return ret;
-}
-module_init(wm8994_i2c_init);
-
-static void __exit wm8994_i2c_exit(void)
-{
-       i2c_del_driver(&wm8994_i2c_driver);
-}
-module_exit(wm8994_i2c_exit);
+module_i2c_driver(wm8994_i2c_driver);
 
 MODULE_DESCRIPTION("Core support for the WM8994 audio CODEC");
 MODULE_LICENSE("GPL");