aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-08-21 10:50:19 +0530
committerTushar Behera <tushar.behera@linaro.org>2012-08-21 10:50:24 +0530
commit706a53a470b305f7dc25f334acb59d6bd443f4e1 (patch)
tree13fbd0b7bfc87714e0195f5bfdc03136eeaf622a
parentb5b775ac0638bdc67e990c4f9e71b92a02637579 (diff)
ASoC: alc5625: Use module_i2c_driver macro
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r--drivers/staging/alc5625/alc5625.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/staging/alc5625/alc5625.c b/drivers/staging/alc5625/alc5625.c
index 3ffe362a493..8f1ae4c869e 100644
--- a/drivers/staging/alc5625/alc5625.c
+++ b/drivers/staging/alc5625/alc5625.c
@@ -2263,27 +2263,7 @@ static struct i2c_driver alc5625_i2c_driver = {
};
#endif
-static int __init alc5625_modinit(void)
-{
- int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- ret = i2c_add_driver(&alc5625_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register ALC5625 I2C driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(alc5625_modinit);
-
-static void __exit alc5625_exit(void)
-{
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- i2c_del_driver(&alc5625_i2c_driver);
-#endif
-}
-module_exit(alc5625_exit);
+module_i2c_driver(alc5625_i2c_driver);
MODULE_DESCRIPTION("ASoC ALC5625 driver");
MODULE_LICENSE("GPL");