From 4331910c99aa1bf744948d5e8f2105ef7c1be54e Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 4 Oct 2011 20:07:03 +0800 Subject: [PATCH] --- yaml --- r: 270751 b: refs/heads/master c: 04f45c493ac6de7c3d1864c3193c225424c25b7d h: refs/heads/master i: 270749: de60387ba41c1bd1c846c0d8208e9df7a676c8b8 270747: ca093523d232cd2d77a3fbcceb537c9ccce461fa 270743: ed972e5e4d3e64a582edf28b7b19c6421096c45e 270735: b3c62d3ba0087aa8ec21347d1278368e3bf7f50c 270719: fbdfbbbfa0e544afd022cd89ef0ae63c9aacaf7b v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8994.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index bd8093a8cc77..3101b28eafab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b1b6cffeb71d363693d15444c79d828153a70865 +refs/heads/master: 04f45c493ac6de7c3d1864c3193c225424c25b7d diff --git a/trunk/sound/soc/codecs/wm8994.c b/trunk/sound/soc/codecs/wm8994.c index 5e8d66d085f5..546173f36269 100644 --- a/trunk/sound/soc/codecs/wm8994.c +++ b/trunk/sound/soc/codecs/wm8994.c @@ -208,7 +208,7 @@ static int configure_aif_clock(struct snd_soc_codec *codec, int aif) static int configure_clock(struct snd_soc_codec *codec) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); - int old, new; + int change, new; /* Bring up the AIF clocks first */ configure_aif_clock(codec, 0); @@ -229,14 +229,11 @@ static int configure_clock(struct snd_soc_codec *codec) else new = 0; - old = snd_soc_read(codec, WM8994_CLOCKING_1) & WM8994_SYSCLK_SRC; - - /* If there's no change then we're done. */ - if (old == new) + change = snd_soc_update_bits(codec, WM8994_CLOCKING_1, + WM8994_SYSCLK_SRC, new); + if (!change) return 0; - snd_soc_update_bits(codec, WM8994_CLOCKING_1, WM8994_SYSCLK_SRC, new); - snd_soc_dapm_sync(&codec->dapm); return 0;