[alsa-devel] [PATCH] cs4231-lib: replace common delay loop by function

Rene Herman rene.herman at gmail.com
Wed Sep 5 21:11:09 CEST 2007


On 09/05/2007 07:09 PM, Krzysztof Helt wrote:

> From: Krzysztof Helt <krzysztof.h1 at wp.pl>
> 
> This patch replaces a common delay loop by a function.
> It also uses ARRAY_SIZE macro for the rates table.
> 
> Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
> ---

> +static void snd_cs4231_wait(struct snd_cs4231 *chip)
>  {
>  	int timeout;
> -	unsigned char tmp;
>  
>  	for (timeout = 250;
>  	     timeout > 0 && (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT);
>  	     timeout--)
>  	     	udelay(100);
> +}

Like the inb() pulled out into the body of the for as you did for ad1848 a 
bit better, but otherwise:

Acked-by: Rene Herman <rene.herman at gmail.com>


More information about the Alsa-devel mailing list