[alsa-devel] [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card()
lars at metafoo.de
Tue Jul 23 21:47:58 CEST 2013
On 07/23/2013 09:32 PM, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 07:57:15PM +0200, Lars-Peter Clausen wrote:
>> On 07/23/2013 07:36 PM, Mark Brown wrote:
>>> We can always add them back in later if they get a user.
>> If there are any out of tree users they should just use dapm->card
>> instead. It's much more simpler than this 'if (dapm->codec) return
>> dapm->codec->card; else if (dapm->platform) return
>> dapm->platform->card;' and at the same time more robust since it
>> also works for dapm contexts which don't belong to a codec or
> Right, though my thought looking at the code was that the intention was
> to also do a transition so that dapm->card isn't there any more.
In a sense the dapm context is like a common base class to both platforms and
codecs. So it's probably better to remove 'card' from the codec and platform
structs. codec->dapm.card is as expensive as codec->card while looking up the
card for the dapm context by either going through the platform or codec is more
expensive than using the direct pointer. But hopefully the component stuff will
fix that all.
More information about the Alsa-devel