| To: | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Subject: | Re: [RFC][PATCH 21/26] alsa: ASoC: Add JZ4740 ASoC support |
| From: | Liam Girdwood <lrg@slimlogic.co.uk> |
| Date: | Thu, 03 Jun 2010 18:03:29 +0100 |
| Cc: | Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Mark Brown <broonie@opensource.wolfsonmicro.com>, alsa-devel@alsa-project.org |
| In-reply-to: | <4C07DD48.2050503@metafoo.de> |
| References: | <1275505397-16758-1-git-send-email-lars@metafoo.de> <1275505950-17334-5-git-send-email-lars@metafoo.de> <1275569309.3593.106.camel@odin> <4C07DD48.2050503@metafoo.de> |
| Sender: | linux-mips-bounce@linux-mips.org |
On Thu, 2010-06-03 at 18:50 +0200, Lars-Peter Clausen wrote:
> >> + config = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai,
> substream);
> >> + if (!prtd->dma) {
> >> + const char *dma_channel_name;
> >> + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> >> + dma_channel_name = "PCM Playback";
> >> + else
> >> + dma_channel_name = "PCM Capture";
> >> +
> >> + prtd->dma = jz4740_dma_request(substream,
> dma_channel_name);
> >>
> >
> > dma_channel_name variable is not required here. Just use the const
> char
> > * directly.
> >
> >
> I actually had it like that before, but I think it is much more readable
> in its current form.
I disagree, having the char pointer here just adds an extra level of
indirection and costs an extra two lines of code.
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC][PATCH 01/26] MIPS: Add base support for Ingenic JZ4740 System-on-a-Chip, Lars-Peter Clausen |
|---|---|
| Next by Date: | Re: [RFC][PATCH 21/26] alsa: ASoC: Add JZ4740 ASoC support, Lars-Peter Clausen |
| Previous by Thread: | Re: [RFC][PATCH 21/26] alsa: ASoC: Add JZ4740 ASoC support, Lars-Peter Clausen |
| Next by Thread: | Re: [RFC][PATCH 21/26] alsa: ASoC: Add JZ4740 ASoC support, Lars-Peter Clausen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |