All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 1/4] ASoC: Add snd_soc_component_{get, set}_drvdata()
Date: Wed, 3 Sep 2014 17:52:58 +0530	[thread overview]
Message-ID: <20140903122258.GB1610@intel.com> (raw)
In-Reply-To: <1408532929-26978-2-git-send-email-lars@metafoo.de>

On Wed, Aug 20, 2014 at 01:08:46PM +0200, Lars-Peter Clausen wrote:
> Add Add snd_soc_component_{get,set}_drvdata() similar to
> snd_soc_codec_{get,set}_drvdata() and snd_soc_platform_{get,set}_drvdata().
> Also update them to use the new functions internally.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

> ---
>  include/sound/soc.h | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index e43fbb6..e6440d8 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -1299,26 +1299,37 @@ static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
>  	return card->drvdata;
>  }
>  
> +static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c,
> +		void *data)
> +{
> +	dev_set_drvdata(c->dev, data);
> +}
> +
> +static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
> +{
> +	return dev_get_drvdata(c->dev);
> +}
> +
>  static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec,
>  		void *data)
>  {
> -	dev_set_drvdata(codec->dev, data);
> +	snd_soc_component_set_drvdata(&codec->component, data);
>  }
>  
>  static inline void *snd_soc_codec_get_drvdata(struct snd_soc_codec *codec)
>  {
> -	return dev_get_drvdata(codec->dev);
> +	return snd_soc_component_get_drvdata(&codec->component);
>  }
>  
>  static inline void snd_soc_platform_set_drvdata(struct snd_soc_platform *platform,
>  		void *data)
>  {
> -	dev_set_drvdata(platform->dev, data);
> +	snd_soc_component_set_drvdata(&platform->component, data);
>  }
>  
>  static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platform)
>  {
> -	return dev_get_drvdata(platform->dev);
> +	return snd_soc_component_get_drvdata(&platform->component);
>  }
>  
>  static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd,
> -- 
> 1.8.0
> 

-- 

  reply	other threads:[~2014-09-03 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 11:08 [PATCH 0/4] ASoC: sst-haswell-pcm: Move controls and DAPM elements to component Lars-Peter Clausen
2014-08-20 11:08 ` [PATCH 1/4] ASoC: Add snd_soc_component_{get, set}_drvdata() Lars-Peter Clausen
2014-09-03 12:22   ` Vinod Koul [this message]
2014-09-03 19:06     ` Lars-Peter Clausen
2014-09-04  6:33       ` Vinod Koul
2014-08-20 11:08 ` [PATCH 2/4] ASoC: sst-haswell-pcm: Alloc state struct in driver probe() Lars-Peter Clausen
2014-08-20 11:08 ` [PATCH 3/4] ASoC: sst-haswell-pcm: Move controls and DAPM elements to component Lars-Peter Clausen
2014-08-20 11:08 ` [PATCH 4/4] ASoC: Remove table based DAPM/control setup support from snd_soc_platform_driver Lars-Peter Clausen
2014-09-06 13:48 ` [PATCH 0/4] ASoC: sst-haswell-pcm: Move controls and DAPM elements to component Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140903122258.GB1610@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.