diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-08-06 07:55:44 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-06 10:20:32 -0400 |
commit | 63a47a7544c65f0d4ca28f3ffa54468bc5f6cc6c (patch) | |
tree | 5164756bb21c82173129e92ef1d7215bc8bb0ebe /sound/soc | |
parent | 0ead1136bda75d04cc134960bd265eebe210f74b (diff) |
ASoC: tlv320dac33: 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')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 0dd41077ab79..d2e16c5d7d1f 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -1621,24 +1621,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = { | |||
1621 | .id_table = tlv320dac33_i2c_id, | 1621 | .id_table = tlv320dac33_i2c_id, |
1622 | }; | 1622 | }; |
1623 | 1623 | ||
1624 | static int __init dac33_module_init(void) | 1624 | module_i2c_driver(tlv320dac33_i2c_driver); |
1625 | { | ||
1626 | int r; | ||
1627 | r = i2c_add_driver(&tlv320dac33_i2c_driver); | ||
1628 | if (r < 0) { | ||
1629 | printk(KERN_ERR "DAC33: driver registration failed\n"); | ||
1630 | return r; | ||
1631 | } | ||
1632 | return 0; | ||
1633 | } | ||
1634 | module_init(dac33_module_init); | ||
1635 | |||
1636 | static void __exit dac33_module_exit(void) | ||
1637 | { | ||
1638 | i2c_del_driver(&tlv320dac33_i2c_driver); | ||
1639 | } | ||
1640 | module_exit(dac33_module_exit); | ||
1641 | |||
1642 | 1625 | ||
1643 | MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver"); | 1626 | MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver"); |
1644 | MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>"); | 1627 | MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>"); |