--- zzzz-none-000/linux-3.10.107/sound/parisc/harmony.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/parisc/harmony.c 2021-02-04 17:41:59.000000000 +0000 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -52,7 +53,6 @@ #include #include -#include #include #include @@ -776,15 +776,9 @@ snd_harmony_captureroute_info(struct snd_kcontrol *kc, struct snd_ctl_elem_info *uinfo) { - static char *texts[2] = { "Line", "Mic" }; - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 2; - if (uinfo->value.enumerated.item > 1) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, - texts[uinfo->value.enumerated.item]); - return 0; + static const char * const texts[2] = { "Line", "Mic" }; + + return snd_ctl_enum_info(uinfo, 1, 2, texts); } static int @@ -899,11 +893,7 @@ if (h->irq >= 0) free_irq(h->irq, h); - if (h->iobase) - iounmap(h->iobase); - - parisc_set_drvdata(h->dev, NULL); - + iounmap(h->iobase); kfree(h); return 0; } @@ -961,8 +951,6 @@ goto free_and_ret; } - snd_card_set_dev(card, &padev->dev); - *rchip = h; return 0; @@ -979,7 +967,7 @@ struct snd_card *card; struct snd_harmony *h; - err = snd_card_create(index, id, THIS_MODULE, 0, &card); + err = snd_card_new(&padev->dev, index, id, THIS_MODULE, 0, &card); if (err < 0) return err; @@ -1016,7 +1004,6 @@ snd_harmony_remove(struct parisc_device *padev) { snd_card_free(parisc_get_drvdata(padev)); - parisc_set_drvdata(padev, NULL); return 0; }