--- zzzz-none-000/linux-3.10.107/sound/sh/aica.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/sh/aica.c 2021-02-04 17:41:59.000000000 +0000 @@ -35,12 +35,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include "aica.h" @@ -343,11 +343,9 @@ mod_timer(&dreamcastcard->timer, jiffies + 4); return; } - init_timer(&(dreamcastcard->timer)); - dreamcastcard->timer.data = (unsigned long) substream; - dreamcastcard->timer.function = aica_period_elapsed; - dreamcastcard->timer.expires = jiffies + 4; - add_timer(&(dreamcastcard->timer)); + setup_timer(&dreamcastcard->timer, aica_period_elapsed, + (unsigned long) substream); + mod_timer(&dreamcastcard->timer, jiffies + 4); } static int snd_aicapcm_pcm_open(struct snd_pcm_substream @@ -598,7 +596,6 @@ return -ENODEV; snd_card_free(dreamcastcard->card); kfree(dreamcastcard); - platform_set_drvdata(devptr, NULL); return 0; } @@ -609,8 +606,8 @@ dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL); if (unlikely(!dreamcastcard)) return -ENOMEM; - err = snd_card_create(index, SND_AICA_DRIVER, THIS_MODULE, 0, - &dreamcastcard->card); + err = snd_card_new(&devptr->dev, index, SND_AICA_DRIVER, + THIS_MODULE, 0, &dreamcastcard->card); if (unlikely(err < 0)) { kfree(dreamcastcard); return err; @@ -625,7 +622,6 @@ err = snd_aicapcmchip(dreamcastcard, 0); if (unlikely(err < 0)) goto freedreamcast; - snd_card_set_dev(dreamcastcard->card, &devptr->dev); dreamcastcard->timer.data = 0; dreamcastcard->channel = NULL; /* Add basic controls */ @@ -654,7 +650,6 @@ .remove = snd_aica_remove, .driver = { .name = SND_AICA_DRIVER, - .owner = THIS_MODULE, }, };