diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-06-22 05:23:34 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-22 17:44:56 +0300 |
commit | 2854a214f398f2c3315204a05efff11739fec062 (patch) | |
tree | b947f60fdd772dac80c0c1e6afb507637511e1ec /sound/soc/codecs/rt1305.c | |
parent | a98ec93d7e378db21a6cdbc6d55feaba9fb4b999 (diff) | |
download | linux-2854a214f398f2c3315204a05efff11739fec062.tar.xz |
ASoC: rt1305: use devm_snd_soc_register_component()
Using devm_snd_soc_register_component() and drop all of the code
related to .remove hook.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt1305.c')
-rw-r--r-- | sound/soc/codecs/rt1305.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c index 421b8fb2fa04..c4452efc7970 100644 --- a/sound/soc/codecs/rt1305.c +++ b/sound/soc/codecs/rt1305.c @@ -1150,17 +1150,11 @@ static int rt1305_i2c_probe(struct i2c_client *i2c, rt1305_reset(rt1305->regmap); rt1305_calibrate(rt1305); - return snd_soc_register_component(&i2c->dev, &soc_component_dev_rt1305, + return devm_snd_soc_register_component(&i2c->dev, + &soc_component_dev_rt1305, rt1305_dai, ARRAY_SIZE(rt1305_dai)); } -static int rt1305_i2c_remove(struct i2c_client *i2c) -{ - snd_soc_unregister_component(&i2c->dev); - - return 0; -} - static void rt1305_i2c_shutdown(struct i2c_client *client) { struct rt1305_priv *rt1305 = i2c_get_clientdata(client); @@ -1180,7 +1174,6 @@ static struct i2c_driver rt1305_i2c_driver = { #endif }, .probe = rt1305_i2c_probe, - .remove = rt1305_i2c_remove, .shutdown = rt1305_i2c_shutdown, .id_table = rt1305_i2c_id, }; |