--- zzzz-none-000/linux-3.10.107/sound/sparc/amd7930.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/sparc/amd7930.c 2021-02-04 17:41:59.000000000 +0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,7 +45,6 @@ #include #include -#include #include #include @@ -956,6 +956,7 @@ if (!amd->regs) { snd_printk(KERN_ERR "amd7930-%d: Unable to map chip registers.\n", dev); + kfree(amd); return -EIO; } @@ -1019,8 +1020,8 @@ return -ENOENT; } - err = snd_card_create(index[dev_num], id[dev_num], THIS_MODULE, 0, - &card); + err = snd_card_new(&op->dev, index[dev_num], id[dev_num], + THIS_MODULE, 0, &card); if (err < 0) return err; @@ -1063,11 +1064,11 @@ }, {}, }; +MODULE_DEVICE_TABLE(of, amd7930_match); static struct platform_driver amd7930_sbus_driver = { .driver = { .name = "audio", - .owner = THIS_MODULE, .of_match_table = amd7930_match, }, .probe = amd7930_sbus_probe,