Re: Is this bug ? dev_set/get_drvdata() of rtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 27, 2016 at 03:25:41AM +0000, Kuninori Morimoto wrote:

> I think device data of "rtd->dev" is set as "rtd" on soc_post_component_init()
> by using dev_set_drvdata(),
> and many soc-core functions are based on it (= they are using dev_get_drvdata())

> But, soc.h has snd_soc_pcm_set_drvdata(). 
> device data of rtd->dev will be overwrite by this function ?
> But is this OK ? or bug ?

Looks like a bug, I suspect there's some confusion caused by old code
expecting there to be a soc-card device there and getting confused.

> static ssize_t codec_reg_show(xxx)
> {
> 	struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
> 	...
> }

We can probably kill this file now, everything is on regmap now.

> 
> static ssize_t pmdown_time_show(xxx)
> {
> 	struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
> 	...
> }

These ones will need a bit more looking at, they probably want to be on
the card using the card device I think.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux