--- zzzz-none-000/linux-3.10.107/sound/drivers/serial-u16550.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/drivers/serial-u16550.c 2021-02-04 17:41:59.000000000 +0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -44,8 +45,6 @@ #include #include -#include - MODULE_DESCRIPTION("MIDI serial u16550"); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{ALSA, MIDI serial u16550}}"); @@ -174,9 +173,8 @@ { if (!uart->timer_running) { /* timer 38600bps * 10bit * 16byte */ - uart->buffer_timer.expires = jiffies + (HZ+255)/256; + mod_timer(&uart->buffer_timer, jiffies + (HZ + 255) / 256); uart->timer_running = 1; - add_timer(&uart->buffer_timer); } } @@ -830,9 +828,8 @@ uart->prev_in = 0; uart->rstatus = 0; memset(uart->prev_status, 0x80, sizeof(unsigned char) * SNDRV_SERIAL_MAX_OUTS); - init_timer(&uart->buffer_timer); - uart->buffer_timer.function = snd_uart16550_buffer_timer; - uart->buffer_timer.data = (unsigned long)uart; + setup_timer(&uart->buffer_timer, snd_uart16550_buffer_timer, + (unsigned long)uart); uart->timer_running = 0; /* Register device */ @@ -942,7 +939,8 @@ return -ENODEV; } - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&devptr->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); if (err < 0) return err; @@ -969,8 +967,6 @@ uart->base, uart->irq); - snd_card_set_dev(card, &devptr->dev); - if ((err = snd_card_register(card)) < 0) goto _err; @@ -985,7 +981,6 @@ static int snd_serial_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - platform_set_drvdata(devptr, NULL); return 0; } @@ -996,7 +991,6 @@ .remove = snd_serial_remove, .driver = { .name = SND_SERIAL_DRIVER, - .owner = THIS_MODULE, }, };