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>
This commit is contained in:
parent
0ead1136bd
commit
63a47a7544
|
@ -1621,24 +1621,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = {
|
||||||
.id_table = tlv320dac33_i2c_id,
|
.id_table = tlv320dac33_i2c_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init dac33_module_init(void)
|
module_i2c_driver(tlv320dac33_i2c_driver);
|
||||||
{
|
|
||||||
int r;
|
|
||||||
r = i2c_add_driver(&tlv320dac33_i2c_driver);
|
|
||||||
if (r < 0) {
|
|
||||||
printk(KERN_ERR "DAC33: driver registration failed\n");
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
module_init(dac33_module_init);
|
|
||||||
|
|
||||||
static void __exit dac33_module_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&tlv320dac33_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(dac33_module_exit);
|
|
||||||
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver");
|
MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver");
|
||||||
MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
|
MODULE_AUTHOR("Peter Ujfalusi <peter.ujfalusi@ti.com>");
|
||||||
|
|
Loading…
Reference in New Issue