[alsa-devel] [v4 02/12] ASoC: Intel: mrfld: set private data for cpu-dai

Lars-Peter Clausen lars at metafoo.de
Thu Aug 14 08:16:37 CEST 2014


On 08/14/2014 07:36 AM, Subhransu S. Prusty wrote:
> On Wed, Aug 13, 2014 at 09:50:43PM +0200, Lars-Peter Clausen wrote:
>> [...]
>>> +static int sst_media_dai_probe(struct snd_soc_dai *cpu_dai)
>>> +{
>>> +	struct sst_data *sst = dev_get_drvdata(cpu_dai->dev);
>>> +
>>> +	snd_soc_dai_set_drvdata(cpu_dai, sst);
>>
>> snd_soc_dai_set_drvdata does dev_set_drvdata(dai->dev, data)
>> internally, so this function does:
>>
>> 	dev_set_drvdata(cpu_dai->dev, dev_get_drvdata(cpu_dai->dev));
>>
>> That's pretty much a noop.
>>
>
> Agree. Intention was to use snd_soc_dai_* API. Anyway will remove and use
> dev_get_drvdata(dai->dev) directly.
>

It's totally fine to use snd_soc_dai_get_drvdata() through the driver. It's 
just that this probe function does nothing and can be removed.


More information about the Alsa-devel mailing list