diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-08-06 07:55:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-06 10:20:35 -0400 |
commit | 2be59418f76dac590b98027586ac1714be17fcae (patch) | |
tree | 5b90cea9915e012128f4fbc62bf474adc6154938 | |
parent | 3c010e60ee54ee19dc2f39b4efa43dea03d65aaa (diff) |
ASoC: wm8974: 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>
-rw-r--r-- | sound/soc/codecs/wm8974.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index d93c03f820c9..9a39511af52a 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -659,23 +659,7 @@ static struct i2c_driver wm8974_i2c_driver = { | |||
659 | .id_table = wm8974_i2c_id, | 659 | .id_table = wm8974_i2c_id, |
660 | }; | 660 | }; |
661 | 661 | ||
662 | static int __init wm8974_modinit(void) | 662 | module_i2c_driver(wm8974_i2c_driver); |
663 | { | ||
664 | int ret = 0; | ||
665 | ret = i2c_add_driver(&wm8974_i2c_driver); | ||
666 | if (ret != 0) { | ||
667 | printk(KERN_ERR "Failed to register wm8974 I2C driver: %d\n", | ||
668 | ret); | ||
669 | } | ||
670 | return ret; | ||
671 | } | ||
672 | module_init(wm8974_modinit); | ||
673 | |||
674 | static void __exit wm8974_exit(void) | ||
675 | { | ||
676 | i2c_del_driver(&wm8974_i2c_driver); | ||
677 | } | ||
678 | module_exit(wm8974_exit); | ||
679 | 663 | ||
680 | MODULE_DESCRIPTION("ASoC WM8974 driver"); | 664 | MODULE_DESCRIPTION("ASoC WM8974 driver"); |
681 | MODULE_AUTHOR("Liam Girdwood"); | 665 | MODULE_AUTHOR("Liam Girdwood"); |