--- zzzz-none-000/linux-3.10.107/sound/soc/ux500/mop500.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/soc/ux500/mop500.c 2021-02-04 17:41:59.000000000 +0000 @@ -27,7 +27,7 @@ #include "mop500_ab8500.h" /* Define the whole MOP500 soundcard, linking platform to the codec-drivers */ -struct snd_soc_dai_link mop500_dai_links[] = { +static struct snd_soc_dai_link mop500_dai_links[] = { { .name = "ab8500_0", .stream_name = "ab8500_0", @@ -52,6 +52,7 @@ static struct snd_soc_card mop500_card = { .name = "MOP500-card", + .owner = THIS_MODULE, .probe = NULL, .dai_link = mop500_dai_links, .num_links = ARRAY_SIZE(mop500_dai_links), @@ -62,12 +63,8 @@ int i; for (i = 0; i < 2; i++) { - if (mop500_dai_links[i].cpu_of_node) - of_node_put((struct device_node *) - mop500_dai_links[i].cpu_of_node); - if (mop500_dai_links[i].codec_of_node) - of_node_put((struct device_node *) - mop500_dai_links[i].codec_of_node); + of_node_put(mop500_dai_links[i].cpu_of_node); + of_node_put(mop500_dai_links[i].codec_of_node); } } @@ -90,6 +87,8 @@ for (i = 0; i < 2; i++) { mop500_dai_links[i].cpu_of_node = msp_np[i]; mop500_dai_links[i].cpu_dai_name = NULL; + mop500_dai_links[i].platform_of_node = msp_np[i]; + mop500_dai_links[i].platform_name = NULL; mop500_dai_links[i].codec_of_node = codec_np; mop500_dai_links[i].codec_name = NULL; } @@ -153,10 +152,10 @@ { .compatible = "stericsson,snd-soc-mop500", }, {}, }; +MODULE_DEVICE_TABLE(of, snd_soc_mop500_match); static struct platform_driver snd_soc_mop500_driver = { .driver = { - .owner = THIS_MODULE, .name = "snd-soc-mop500", .of_match_table = snd_soc_mop500_match, },