diff options
Diffstat (limited to 'sound/drivers/mpu401/mpu401.c')
-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; |