diff options
author | Mark Brown <broonie@linaro.org> | 2013-11-28 18:24:55 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-02 14:50:34 +0100 |
commit | 2f54d2a1cf7e62f56b1b0bcf44bd704f65359f38 (patch) | |
tree | d402644619d126a1cbe39cc7a4cf70e69a1165ea /sound/soc/codecs/ak4642.c | |
parent | ASoC: ak4642: Convert to direct regmap API usage (diff) | |
download | linux-2f54d2a1cf7e62f56b1b0bcf44bd704f65359f38.tar.xz linux-2f54d2a1cf7e62f56b1b0bcf44bd704f65359f38.zip |
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>
Diffstat (limited to 'sound/soc/codecs/ak4642.c')
-rw-r--r-- | sound/soc/codecs/ak4642.c | 22 |
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 = { .num_reg_defaults = ARRAY_SIZE(ak4648_reg), }; -#if IS_ENABLED(CONFIG_I2C) static struct of_device_id ak4642_of_match[]; static int ak4642_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) @@ -577,27 +576,8 @@ static struct i2c_driver ak4642_i2c_driver = { .remove = ak4642_i2c_remove, .id_table = ak4642_i2c_id, }; -#endif -static int __init ak4642_modinit(void) -{ - int ret = 0; -#if IS_ENABLED(CONFIG_I2C) - ret = i2c_add_driver(&ak4642_i2c_driver); -#endif - return ret; - -} -module_init(ak4642_modinit); - -static void __exit ak4642_exit(void) -{ -#if IS_ENABLED(CONFIG_I2C) - i2c_del_driver(&ak4642_i2c_driver); -#endif - -} -module_exit(ak4642_exit); +module_i2c_driver(ak4642_i2c_driver); MODULE_DESCRIPTION("Soc AK4642 driver"); MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); |