diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-06-28 07:09:40 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-02 15:51:29 +0300 |
commit | 35407f9ffd84560501f72ee3954344f8e5b49264 (patch) | |
tree | dc5f78fef783e023f070ba1664c7552b97e3fedd /sound/soc/codecs/ak4118.c | |
parent | 61c8a7d6ff11a31fc4ea47667c5f33119be7bcd3 (diff) | |
download | linux-35407f9ffd84560501f72ee3954344f8e5b49264.tar.xz |
ASoC: ak4118: use devm_snd_soc_register_component()
We have devm_xxx version of snd_soc_register_component,
let's use it.
This patch also removes related empty functions
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/ak4118.c')
-rw-r--r-- | sound/soc/codecs/ak4118.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c index ce419e8cf890..f44d9a4a8507 100644 --- a/sound/soc/codecs/ak4118.c +++ b/sound/soc/codecs/ak4118.c @@ -400,14 +400,8 @@ static int ak4118_i2c_probe(struct i2c_client *i2c, return ret; } - return snd_soc_register_component(&i2c->dev, &soc_component_drv_ak4118, - &ak4118_dai, 1); -} - -static int ak4118_i2c_remove(struct i2c_client *i2c) -{ - snd_soc_unregister_component(&i2c->dev); - return 0; + return devm_snd_soc_register_component(&i2c->dev, + &soc_component_drv_ak4118, &ak4118_dai, 1); } static const struct of_device_id ak4118_of_match[] = { @@ -429,7 +423,6 @@ static struct i2c_driver ak4118_i2c_driver = { }, .id_table = ak4118_id_table, .probe = ak4118_i2c_probe, - .remove = ak4118_i2c_remove, }; module_i2c_driver(ak4118_i2c_driver); |