[alsa-devel] [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card()

Lars-Peter Clausen lars at metafoo.de
Tue Jul 23 19:57:15 CEST 2013

On 07/23/2013 07:36 PM, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 01:49:42PM +0100, Liam Girdwood wrote:
>> On Tue, 2013-07-23 at 11:12 +0200, Lars-Peter Clausen wrote:
>>> Add methods to retrieve snd_card and soc_card from dapm context.") but have
>>> remained unused so far. Considering that the dapm context actually has a direct
>>> pointer to the card the functions also seem to be unnecessary. E.g. the
>>> expressions 'dapm_get_soc_card(dapm)' and 'dapm->card' yield the same result.
>> Peter may have a user for these, but maybe not ?
> 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 platform.

- Lars

More information about the Alsa-devel mailing list