--- zzzz-none-000/linux-3.10.107/sound/pcmcia/pdaudiocf/pdaudiocf.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/pcmcia/pdaudiocf/pdaudiocf.c 2021-02-04 17:41:59.000000000 +0000 @@ -61,6 +61,7 @@ static void pdacf_release(struct pcmcia_device *link) { + free_irq(link->irq, link->priv); pcmcia_disable_device(link); } @@ -112,7 +113,8 @@ return -ENODEV; /* disabled explicitly */ /* ok, create a card instance */ - err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card); + err = snd_card_new(&link->dev, index[i], id[i], THIS_MODULE, + 0, &card); if (err < 0) { snd_printk(KERN_ERR "pdacf: cannot create a card instance\n"); return err; @@ -131,8 +133,6 @@ return err; } - snd_card_set_dev(card, &link->dev); - pdacf->index = i; card_list[i] = card; @@ -221,11 +221,13 @@ ret = pcmcia_request_io(link); if (ret) - goto failed; + goto failed_preirq; - ret = pcmcia_request_irq(link, pdacf_interrupt); + ret = request_threaded_irq(link->irq, pdacf_interrupt, + pdacf_threaded_irq, + IRQF_SHARED, link->devname, link->priv); if (ret) - goto failed; + goto failed_preirq; ret = pcmcia_enable_device(link); if (ret) @@ -237,7 +239,9 @@ return 0; -failed: + failed: + free_irq(link->irq, link->priv); +failed_preirq: pcmcia_disable_device(link); return -ENODEV; }