diff mbox series

[12/23] ASoC: ak4118: use devm_snd_soc_register_component()

Message ID 87lfxniybh.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show
Series ASoC: use devm_xxx | expand

Commit Message

Kuninori Morimoto June 27, 2019, 2 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

We have devm_xxx version of snd_soc_register_component,
let's use it.

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

Comments

Amadeusz Sławiński June 27, 2019, 7:43 a.m. UTC | #1
On 27 Jun 2019 11:00:50 +0900
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:

> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> We have devm_xxx version of snd_soc_register_component,
> let's use it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/codecs/ak4118.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c
> index ce419e8..efbe2d6 100644
> --- a/sound/soc/codecs/ak4118.c
> +++ b/sound/soc/codecs/ak4118.c
> @@ -400,13 +400,12 @@ 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);
> +	return devm_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;
>  }
>  

Remove whole function.
Kuninori Morimoto June 27, 2019, 7:51 a.m. UTC | #2
Hi Amadeusz

Thank you for your feedback.
This patch is focusing to using devm_xxx().
Removing empty funcion can be other patch series.
But, I can create v2 to remove empty funcion, of course.
I'm very open. Mark what is your opinion ?

> On 27 Jun 2019 11:00:50 +0900
> Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:
> 
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > We have devm_xxx version of snd_soc_register_component,
> > let's use it.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  sound/soc/codecs/ak4118.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c
> > index ce419e8..efbe2d6 100644
> > --- a/sound/soc/codecs/ak4118.c
> > +++ b/sound/soc/codecs/ak4118.c
> > @@ -400,13 +400,12 @@ 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);
> > +	return devm_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;
> >  }
> >  
> 
> Remove whole function.
diff mbox series

Patch

diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c
index ce419e8..efbe2d6 100644
--- a/sound/soc/codecs/ak4118.c
+++ b/sound/soc/codecs/ak4118.c
@@ -400,13 +400,12 @@  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);
+	return devm_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;
 }