All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card()
Date: Tue, 23 Jul 2013 21:47:58 +0200	[thread overview]
Message-ID: <51EEDDEE.9030701@metafoo.de> (raw)
In-Reply-To: <20130723193204.GQ9858@sirena.org.uk>

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
>> platform.
>
> 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.

- Lars

  reply	other threads:[~2013-07-23 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23  9:12 [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card() Lars-Peter Clausen
2013-07-23 12:49 ` Liam Girdwood
2013-07-23 17:36   ` Mark Brown
2013-07-23 17:57     ` Lars-Peter Clausen
2013-07-23 19:32       ` Mark Brown
2013-07-23 19:47         ` Lars-Peter Clausen [this message]
2013-07-24  0:10           ` Mark Brown
2013-07-23 19:14   ` Peter Ujfalusi
2013-07-23 12:56 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51EEDDEE.9030701@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=peter.ujfalusi@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.