diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-08-06 07:55:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-06 10:20:34 -0400 |
commit | 8b08eb28c761aea8434e0228a0f080e31e16d791 (patch) | |
tree | b97d495330085483b1d7dee1f30d4a9c57048f5b /sound/soc/codecs/wm8961.c | |
parent | 794836b959e95b4e4705e11e7bdf2a688c72e2f7 (diff) |
ASoC: wm8961: Use module_i2c_driver
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>
Diffstat (limited to 'sound/soc/codecs/wm8961.c')
-rw-r--r-- | sound/soc/codecs/wm8961.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 01edbcc754d2..719fb69a17c8 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -1114,23 +1114,7 @@ static struct i2c_driver wm8961_i2c_driver = { | |||
1114 | .id_table = wm8961_i2c_id, | 1114 | .id_table = wm8961_i2c_id, |
1115 | }; | 1115 | }; |
1116 | 1116 | ||
1117 | static int __init wm8961_modinit(void) | 1117 | module_i2c_driver(wm8961_i2c_driver); |
1118 | { | ||
1119 | int ret = 0; | ||
1120 | ret = i2c_add_driver(&wm8961_i2c_driver); | ||
1121 | if (ret != 0) { | ||
1122 | printk(KERN_ERR "Failed to register wm8961 I2C driver: %d\n", | ||
1123 | ret); | ||
1124 | } | ||
1125 | return ret; | ||
1126 | } | ||
1127 | module_init(wm8961_modinit); | ||
1128 | |||
1129 | static void __exit wm8961_exit(void) | ||
1130 | { | ||
1131 | i2c_del_driver(&wm8961_i2c_driver); | ||
1132 | } | ||
1133 | module_exit(wm8961_exit); | ||
1134 | 1118 | ||
1135 | MODULE_DESCRIPTION("ASoC WM8961 driver"); | 1119 | MODULE_DESCRIPTION("ASoC WM8961 driver"); |
1136 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 1120 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |