--- zzzz-none-000/linux-3.10.107/sound/drivers/mtpav.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/drivers/mtpav.c 2021-02-04 17:41:59.000000000 +0000 @@ -414,8 +414,7 @@ spin_lock_irqsave(&chip->spinlock, flags); /* reprogram timer */ - chip->timer.expires = 1 + jiffies; - add_timer(&chip->timer); + mod_timer(&chip->timer, 1 + jiffies); /* process each port */ for (p = 0; p <= chip->num_ports * 2 + MTPAV_PIDX_BROADCAST; p++) { struct mtpav_port *portp = &chip->ports[p]; @@ -428,8 +427,7 @@ /* spinlock held! */ static void snd_mtpav_add_output_timer(struct mtpav *chip) { - chip->timer.expires = 1 + jiffies; - add_timer(&chip->timer); + mod_timer(&chip->timer, 1 + jiffies); } /* spinlock held! */ @@ -697,21 +695,20 @@ int err; struct mtpav *mtp_card; - err = snd_card_create(index, id, THIS_MODULE, sizeof(*mtp_card), &card); + err = snd_card_new(&dev->dev, index, id, THIS_MODULE, + sizeof(*mtp_card), &card); if (err < 0) return err; mtp_card = card->private_data; spin_lock_init(&mtp_card->spinlock); - init_timer(&mtp_card->timer); mtp_card->card = card; mtp_card->irq = -1; mtp_card->share_irq = 0; mtp_card->inmidistate = 0; mtp_card->outmidihwport = 0xffffffff; - init_timer(&mtp_card->timer); - mtp_card->timer.function = snd_mtpav_output_timer; - mtp_card->timer.data = (unsigned long) mtp_card; + setup_timer(&mtp_card->timer, snd_mtpav_output_timer, + (unsigned long) mtp_card); card->private_free = snd_mtpav_free; @@ -732,7 +729,6 @@ snd_mtpav_portscan(mtp_card); - snd_card_set_dev(card, &dev->dev); err = snd_card_register(mtp_card->card); if (err < 0) goto __error; @@ -749,7 +745,6 @@ static int snd_mtpav_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - platform_set_drvdata(devptr, NULL); return 0; } @@ -760,7 +755,6 @@ .remove = snd_mtpav_remove, .driver = { .name = SND_MTPAV_DRIVER, - .owner = THIS_MODULE, }, };