diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-29 12:59:08 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-12 10:58:20 +0100 |
commit | 5872f3f621f9f65342583a85ec93b00c0a697eda (patch) | |
tree | 6deaa1d968889986fcf84a38abb436961e613f60 /sound/drivers/mpu401 | |
parent | 393aa9c1cc514774332d7bc861307a76206e358d (diff) |
ALSA: drivers: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/mpu401')
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 90a3a7b38a2a..83014b83a44e 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -64,7 +64,8 @@ static struct platform_device *platform_devices[SNDRV_CARDS]; static int pnp_registered; static unsigned int snd_mpu401_devices; -static int snd_mpu401_create(int dev, struct snd_card **rcard) +static int snd_mpu401_create(struct device *devptr, int dev, + struct snd_card **rcard) { struct snd_card *card; int err; @@ -73,7 +74,8 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n"); *rcard = NULL; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE, + 0, &card); if (err < 0) return err; strcpy(card->driver, "MPU-401 UART"); @@ -114,10 +116,9 @@ static int snd_mpu401_probe(struct platform_device *devptr) snd_printk(KERN_ERR "specify or disable IRQ\n"); return -EINVAL; } - err = snd_mpu401_create(dev, &card); + err = snd_mpu401_create(&devptr->dev, dev, &card); if (err < 0) return err; - snd_card_set_dev(card, &devptr->dev); if ((err = snd_card_register(card)) < 0) { snd_card_free(card); return err; @@ -194,14 +195,13 @@ static int snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev, err = snd_mpu401_pnp(dev, pnp_dev, id); if (err < 0) return err; - err = snd_mpu401_create(dev, &card); + err = snd_mpu401_create(&pnp_dev->dev, dev, &card); if (err < 0) return err; if ((err = snd_card_register(card)) < 0) { snd_card_free(card); return err; } - snd_card_set_dev(card, &pnp_dev->dev); pnp_set_drvdata(pnp_dev, card); snd_mpu401_devices++; ++dev; |