[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF+7xWmdNqEuVCNB=53FftFm_Ds-=o5DwVa41MDq8m0DTZnzxg@mail.gmail.com>
Date:	Sat, 15 Oct 2011 11:21:49 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, Liam Girdwood <lrg@...com>,
	Barry Song <21cnbao@...il.com>, alsa-devel@...a-project.org
Subject: Re: [PATCH 2/2] ASoC: ad193x: Use snd_soc_update_bits for read-modify-write
2011/10/15 Mark Brown <broonie@...nsource.wolfsonmicro.com>:
> On Fri, Oct 14, 2011 at 05:03:07PM +0800, Axel Lin wrote:
>
>>       reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
>> -     reg = (mute > 0) ? reg | AD193X_DAC_MASTER_MUTE : reg &
>> -             (~AD193X_DAC_MASTER_MUTE);
>> +     if (mute)
>> +             reg |= AD193X_DAC_MASTER_MUTE;
>> +     else
>> +             reg &= ~AD193X_DAC_MASTER_MUTE;
>>       snd_soc_write(codec, AD193X_DAC_CTRL2, reg);
>
> This is still using snd_soc_read() and snd_soc_write() (though it is a
> cleanup).
>
hi Mark,
One of the major reason that I do the convert to snd_soc_update_bits
is for better readability.
In this case, it seems ok to me with this change.
But if you prefer also convert it to snd_soc_update_bits, I can do it.
Let me know if I need to send a v2 for it.
Thanks,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
