Skip to content

Commit

Permalink
ASoC: tas5086: use module_i2c_driver to simplify the code
Browse files Browse the repository at this point in the history
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Wei Yongjun authored and Mark Brown committed Mar 12, 2013
1 parent 4fa8934 commit c300d6d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions sound/soc/codecs/tas5086.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,17 +584,7 @@ static struct i2c_driver tas5086_i2c_driver = {
.remove = tas5086_i2c_remove,
};

static int __init tas5086_modinit(void)
{
return i2c_add_driver(&tas5086_i2c_driver);
}
module_init(tas5086_modinit);

static void __exit tas5086_modexit(void)
{
i2c_del_driver(&tas5086_i2c_driver);
}
module_exit(tas5086_modexit);
module_i2c_driver(tas5086_i2c_driver);

MODULE_AUTHOR("Daniel Mack <zonque@gmail.com>");
MODULE_DESCRIPTION("Texas Instruments TAS5086 ALSA SoC Codec Driver");
Expand Down

0 comments on commit c300d6d

Please sign in to comment.