aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-28 12:24:55 -0500
committerMark Brown <broonie@linaro.org>2013-12-02 08:50:34 -0500
commit2f54d2a1cf7e62f56b1b0bcf44bd704f65359f38 (patch)
treed402644619d126a1cbe39cc7a4cf70e69a1165ea
parent4574cd94a717eff3021a3e187dd48846adbd21ea (diff)
ASoC: ak4642: Convert to module_i2c_driver()
The device does not support anything other than I2C (at least with the current driver) so save code. Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/ak4642.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 5af237468618..1f646c6e90c6 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -513,7 +513,6 @@ static const struct regmap_config ak4648_regmap = {
513 .num_reg_defaults = ARRAY_SIZE(ak4648_reg), 513 .num_reg_defaults = ARRAY_SIZE(ak4648_reg),
514}; 514};
515 515
516#if IS_ENABLED(CONFIG_I2C)
517static struct of_device_id ak4642_of_match[]; 516static struct of_device_id ak4642_of_match[];
518static int ak4642_i2c_probe(struct i2c_client *i2c, 517static int ak4642_i2c_probe(struct i2c_client *i2c,
519 const struct i2c_device_id *id) 518 const struct i2c_device_id *id)
@@ -577,27 +576,8 @@ static struct i2c_driver ak4642_i2c_driver = {
577 .remove = ak4642_i2c_remove, 576 .remove = ak4642_i2c_remove,
578 .id_table = ak4642_i2c_id, 577 .id_table = ak4642_i2c_id,
579}; 578};
580#endif
581 579
582static int __init ak4642_modinit(void) 580module_i2c_driver(ak4642_i2c_driver);
583{
584 int ret = 0;
585#if IS_ENABLED(CONFIG_I2C)
586 ret = i2c_add_driver(&ak4642_i2c_driver);
587#endif
588 return ret;
589
590}
591module_init(ak4642_modinit);
592
593static void __exit ak4642_exit(void)
594{
595#if IS_ENABLED(CONFIG_I2C)
596 i2c_del_driver(&ak4642_i2c_driver);
597#endif
598
599}
600module_exit(ak4642_exit);
601 581
602MODULE_DESCRIPTION("Soc AK4642 driver"); 582MODULE_DESCRIPTION("Soc AK4642 driver");
603MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); 583MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");