lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1461686780-22885-3-git-send-email-rf@opensource.wolfsonmicro.com>
Date:	Tue, 26 Apr 2016 17:06:20 +0100
From:	Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
To:	<lee.jones@...aro.org>, <broonie@...nel.org>
CC:	<patches@...nsource.wolfsonmicro.com>,
	<linux-kernel@...r.kernel.org>, <alsa-devel@...a-project.org>
Subject: [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control

The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of
a '1', a write of '0' is ignored. So there's no need to use update_bits.
We can do a simple write to set bits.

Signed-off-by: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 0cd27e0..e255740 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1126,7 +1126,6 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
 		   int event)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
-	unsigned int mask = 0x3 << w->shift;
 	unsigned int val;
 
 	switch (event) {
@@ -1140,7 +1139,7 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
 		return 0;
 	}
 
-	snd_soc_update_bits(codec, ARIZONA_CLOCK_CONTROL, mask, val);
+	snd_soc_write(codec, ARIZONA_CLOCK_CONTROL, val);
 
 	return 0;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ