summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-12 18:39:49 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-13 11:38:01 -0800
commit2dbc34d827d17e2f4926d4424b5e41c25c70238a (patch)
tree67d00415ab87a614c49fa11934bf4e5638d82fb9
parentdd7d3a2417ba3358dfeb10c085c4d38035d352d4 (diff)
downloadtalos-op-linux-2dbc34d827d17e2f4926d4424b5e41c25c70238a.tar.gz
talos-op-linux-2dbc34d827d17e2f4926d4424b5e41c25c70238a.zip
ASoC: wm9081: Use module_i2c_driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/wm9081.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 7b09b1f86dbb..ebd3a8a03a23 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1435,28 +1435,7 @@ static struct i2c_driver wm9081_i2c_driver = {
};
#endif
-static int __init wm9081_modinit(void)
-{
- int ret = 0;
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- ret = i2c_add_driver(&wm9081_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM9081 I2C driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm9081_modinit);
-
-static void __exit wm9081_exit(void)
-{
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- i2c_del_driver(&wm9081_i2c_driver);
-#endif
-}
-module_exit(wm9081_exit);
-
+module_i2c_driver(wm9081_i2c_driver);
MODULE_DESCRIPTION("ASoC WM9081 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
OpenPOWER on IntegriCloud