Re: [RFC][PATCH 0/x] ASoC: replace platform to component

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

 



Hi Mark, Lars-Peter

> 1st Note is that it is still using rtd->platform_com style.

It is still using this "rtd->xxx" style, but we should expand it.
I'm thinking that we can connect each component to rtd by using list
and we can get it by "driver" (or something).
Then, we can add new snd_soc_lookup_runtime() function for it.
But, what do you think ?

	- rtd->platform_com = component;
	+ list_add(component->rtd_list, rtd->list_head);

	- struct device *dev = rtd->platform_com->dev;
	+ struct snd_soc_component *component = snd_soc_lookup_runtime(rtd, driver);
	+ struct device *dev = component->dev;

struct snd_soc_component *snd_soc_lookup_runtime(rtd, driver)
{
	...
	list_for_each_entry(component, &rtd->list_head, xxx) {
		if (driver == component->driver)
			return component;
	}

	return NULL;
}


Best regards
---
Kuninori Morimoto



[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