diff mbox series

[06/16] ASoC: rt5668: use devm_snd_soc_register_component()

Message ID 87k1nyrut2.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit 4fe1984ebc086ee39dd57983a7fee84c96c954a7
Headers show
Series ASoC: use devm_snd_soc_register_component() | expand

Commit Message

Kuninori Morimoto Sept. 7, 2018, 1:01 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5668.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Mark Brown Sept. 10, 2018, 2:08 p.m. UTC | #1
On Fri, Sep 07, 2018 at 01:01:34AM +0000, Kuninori Morimoto wrote:

>  static int rt5668_i2c_remove(struct i2c_client *i2c)
>  {
> -	snd_soc_unregister_component(&i2c->dev);
> -
>  	return 0;
>  }

This one is fine but the function is now empty so should be removed
entirely.
Kuninori Morimoto Sept. 11, 2018, 12:09 a.m. UTC | #2
Hi Mark

> >  static int rt5668_i2c_remove(struct i2c_client *i2c)
> >  {
> > -	snd_soc_unregister_component(&i2c->dev);
> > -
> >  	return 0;
> >  }
> 
> This one is fine but the function is now empty so should be removed
> entirely.

OK.
Will post v2


Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c
index 3c19d03..4412cd2 100644
--- a/sound/soc/codecs/rt5668.c
+++ b/sound/soc/codecs/rt5668.c
@@ -2587,14 +2587,12 @@  static int rt5668_i2c_probe(struct i2c_client *i2c,
 
 	}
 
-	return snd_soc_register_component(&i2c->dev, &soc_component_dev_rt5668,
+	return devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_rt5668,
 			rt5668_dai, ARRAY_SIZE(rt5668_dai));
 }
 
 static int rt5668_i2c_remove(struct i2c_client *i2c)
 {
-	snd_soc_unregister_component(&i2c->dev);
-
 	return 0;
 }