lkml.org 
[lkml]   [2011]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] ASoC: ad193x: Use snd_soc_update_bits for read-modify-write
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).


\
 
 \ /
  Last update: 2011-10-14 21:13    [W:0.102 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site