--- zzzz-none-000/linux-3.10.107/sound/isa/opti9xx/miro.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/isa/opti9xx/miro.c 2021-02-04 17:41:59.000000000 +0000 @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -1270,8 +1270,6 @@ int error; struct snd_miro *miro = card->private_data; struct snd_wss *codec; - struct snd_timer *timer; - struct snd_pcm *pcm; struct snd_rawmidi *rmidi; if (!miro->res_mc_base) { @@ -1310,7 +1308,7 @@ if (error < 0) return error; - error = snd_wss_pcm(codec, 0, &pcm); + error = snd_wss_pcm(codec, 0); if (error < 0) return error; @@ -1318,11 +1316,11 @@ if (error < 0) return error; - error = snd_wss_timer(codec, 0, &timer); + error = snd_wss_timer(codec, 0); if (error < 0) return error; - miro->pcm = pcm; + miro->pcm = codec->pcm; error = snd_miro_mixer(card, miro); if (error < 0) @@ -1356,8 +1354,8 @@ strcpy(card->driver, "miro"); sprintf(card->longname, "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d", - card->shortname, miro->name, pcm->name, miro->wss_base + 4, - miro->irq, miro->dma1, miro->dma2); + card->shortname, miro->name, codec->pcm->name, + miro->wss_base + 4, miro->irq, miro->dma1, miro->dma2); if (mpu_port <= 0 || mpu_port == SNDRV_AUTO_PORT) rmidi = NULL; @@ -1411,8 +1409,8 @@ struct snd_miro *miro; struct snd_card *card; - error = snd_card_create(index, id, THIS_MODULE, - sizeof(struct snd_miro), &card); + error = snd_card_new(devptr, index, id, THIS_MODULE, + sizeof(struct snd_miro), &card); if (error < 0) return error; @@ -1479,8 +1477,6 @@ } } - snd_card_set_dev(card, devptr); - error = snd_miro_probe(card); if (error < 0) { snd_card_free(card); @@ -1495,7 +1491,6 @@ unsigned int dev) { snd_card_free(dev_get_drvdata(devptr)); - dev_set_drvdata(devptr, NULL); return 0; } @@ -1585,8 +1580,8 @@ return -EBUSY; if (!isapnp) return -ENODEV; - err = snd_card_create(index, id, THIS_MODULE, - sizeof(struct snd_miro), &card); + err = snd_card_new(&pcard->card->dev, index, id, THIS_MODULE, + sizeof(struct snd_miro), &card); if (err < 0) return err; @@ -1613,7 +1608,6 @@ return err; } - snd_card_set_dev(card, &pcard->card->dev); err = snd_miro_probe(card); if (err < 0) { snd_card_free(card);