alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Wan ZongShun <mcuos.com@gmail.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH 2/3] ALSA/NUC900: Fix a while loop bug for nuc900 alsa driver
Date: Tue, 01 Jun 2010 10:06:42 +0100	[thread overview]
Message-ID: <1275383202.3060.9.camel@odin> (raw)
In-Reply-To: <4C04756E.4000400@gmail.com>

On Tue, 2010-06-01 at 10:50 +0800, Wan ZongShun wrote:
> Dear all,
> 
> This patch is to fix a while loop bug for nuc900 alsa driver.

Which bug ? It's best to say the bug you are fixing when submitting a
patch like this.

Thanks

Liam

> 
> Signed-off-by: Wan ZongShun<mcuos.com@gmail.com>
> ---
>  sound/soc/nuc900/nuc900-ac97.c |   10 ++++------
>  1 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
> index 5b864f9..db7fc13 100644
> --- a/sound/soc/nuc900/nuc900-ac97.c
> +++ b/sound/soc/nuc900/nuc900-ac97.c
> @@ -66,9 +66,8 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97,
>  	udelay(100);
> 
>  	/* polling the AC_R_FINISH */
> -	val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON);
> -	val &= AC_R_FINISH;
> -	while (!val && timeout--)
> +	while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH)
> +								&& timeout--)
>  		mdelay(1);
> 
>  	if (!timeout) {
> @@ -121,9 +120,8 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned
> short reg,
>  	udelay(100);
> 
>  	/* polling the AC_W_FINISH */
> -	tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON);
> -	tmp &= AC_W_FINISH;
> -	while (tmp && timeout--)
> +	while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH)
> +								&& timeout--)
>  		mdelay(1);
> 
>  	if (!timeout)

           reply	other threads:[~2010-06-01  9:06 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4C04756E.4000400@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275383202.3060.9.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=mcuos.com@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).