lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 21/26] alsa: ASoC: Add JZ4740 ASoC support
From
Date
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



\
 
 \ /
  Last update: 2010-06-03 19:05    [W:0.151 / U:1.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site