From: Takashi Iwai Date: Thu, 20 Dec 2012 10:02:00 +0000 (+0100) Subject: ALSA: hda - Clear cached_write flag in snd_hda_codec_resume_*() X-Git-Tag: v3.9-rc1~52^2~77^2~136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa88a3553eebdcc3ce6801aabb4ed0223bfa198e;p=platform%2Fkernel%2Flinux-exynos.git ALSA: hda - Clear cached_write flag in snd_hda_codec_resume_*() These functions are supposed to be called at finishing the cached sequential writes, so clear the flag properly for lazy developers who often forget details. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 23c8214..3207e5c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1955,6 +1955,7 @@ void snd_hda_codec_resume_amp(struct hda_codec *codec) int i; mutex_lock(&codec->hash_mutex); + codec->cached_write = 0; for (i = 0; i < codec->amp_cache.buf.used; i++) { struct hda_amp_info *buffer; u32 key; @@ -3520,6 +3521,7 @@ void snd_hda_codec_resume_cache(struct hda_codec *codec) int i; mutex_lock(&codec->hash_mutex); + codec->cached_write = 0; for (i = 0; i < codec->cmd_cache.buf.used; i++) { struct hda_cache_head *buffer; u32 key;