--- zzzz-none-000/linux-3.10.107/sound/drivers/mpu401/mpu401.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/drivers/mpu401/mpu401.c 2021-02-04 17:41:59.000000000 +0000 @@ -64,7 +64,8 @@ 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 @@ 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 @@ 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; @@ -129,7 +130,6 @@ static int snd_mpu401_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - platform_set_drvdata(devptr, NULL); return 0; } @@ -140,7 +140,6 @@ .remove = snd_mpu401_remove, .driver = { .name = SND_MPU401_DRIVER, - .owner = THIS_MODULE, }, }; @@ -195,14 +194,13 @@ 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;