diff mbox

[2/2] ALSA: sound/atmel/ac97c.c: Fix device index for pcm

Message ID 1417790574-13919-2-git-send-email-alexanders83@web.de (mailing list archive)
State Accepted
Commit ca460cc250aa9d5255b3e2469ca0abad5d136233
Headers show

Commit Message

Alexander Stein Dec. 5, 2014, 2:42 p.m. UTC
chip->pdev->id is -1 by default. This is an invalid index resulting in
device file names like /dev/snd/pcmC0D-1p.

Signed-off-by: Alexander Stein <alexanders83@web.de>
---
 sound/atmel/ac97c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai Dec. 5, 2014, 4:42 p.m. UTC | #1
At Fri,  5 Dec 2014 15:42:54 +0100,
Alexander Stein wrote:
> 
> chip->pdev->id is -1 by default. This is an invalid index resulting in
> device file names like /dev/snd/pcmC0D-1p.
> 
> Signed-off-by: Alexander Stein <alexanders83@web.de>

Applied, thanks.


Takashi

> ---
>  sound/atmel/ac97c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
> index ff2f743..fa283d3 100644
> --- a/sound/atmel/ac97c.c
> +++ b/sound/atmel/ac97c.c
> @@ -776,7 +776,7 @@ static int atmel_ac97c_pcm_new(struct atmel_ac97c *chip)
>  			return err;
>  	}
>  	retval = snd_pcm_new(chip->card, chip->card->shortname,
> -			chip->pdev->id, playback, capture, &pcm);
> +			0, playback, capture, &pcm);
>  	if (retval)
>  		return retval;
>  
> -- 
> 2.2.0
>
diff mbox

Patch

diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index ff2f743..fa283d3 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -776,7 +776,7 @@  static int atmel_ac97c_pcm_new(struct atmel_ac97c *chip)
 			return err;
 	}
 	retval = snd_pcm_new(chip->card, chip->card->shortname,
-			chip->pdev->id, playback, capture, &pcm);
+			0, playback, capture, &pcm);
 	if (retval)
 		return retval;