From 54d8697fa5036df0e27f8d62edb7ebc35c3f73d6 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 21 Aug 2015 20:59:21 +0800 Subject: ASoC: Set missing card owner field Set the card owner field to prevent the module from being removed from underneath its users. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- sound/soc/blackfin/bfin-eval-adau1x61.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/soc/blackfin') diff --git a/sound/soc/blackfin/bfin-eval-adau1x61.c b/sound/soc/blackfin/bfin-eval-adau1x61.c index 4229f76daec9..fddfe00c9d69 100644 --- a/sound/soc/blackfin/bfin-eval-adau1x61.c +++ b/sound/soc/blackfin/bfin-eval-adau1x61.c @@ -108,6 +108,7 @@ static struct snd_soc_dai_link bfin_eval_adau1x61_dai = { static struct snd_soc_card bfin_eval_adau1x61 = { .name = "bfin-eval-adau1x61", + .owner = THIS_MODULE, .driver_name = "eval-adau1x61", .dai_link = &bfin_eval_adau1x61_dai, .num_links = 1, -- cgit From c4d2ab0d59f53a1534e6817b5dbd28719f667c39 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 27 Aug 2015 09:11:13 +0800 Subject: ASoC: blackfin: Convert to devm_snd_soc_register_platform Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- sound/soc/blackfin/bf5xx-ac97-pcm.c | 10 ++-------- sound/soc/blackfin/bf5xx-i2s-pcm.c | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'sound/soc/blackfin') diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index 238913e030e0..02ad2606fa19 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c @@ -450,13 +450,8 @@ static struct snd_soc_platform_driver bf5xx_ac97_soc_platform = { static int bf5xx_soc_platform_probe(struct platform_device *pdev) { - return snd_soc_register_platform(&pdev->dev, &bf5xx_ac97_soc_platform); -} - -static int bf5xx_soc_platform_remove(struct platform_device *pdev) -{ - snd_soc_unregister_platform(&pdev->dev); - return 0; + return devm_snd_soc_register_platform(&pdev->dev, + &bf5xx_ac97_soc_platform); } static struct platform_driver bf5xx_pcm_driver = { @@ -465,7 +460,6 @@ static struct platform_driver bf5xx_pcm_driver = { }, .probe = bf5xx_soc_platform_probe, - .remove = bf5xx_soc_platform_remove, }; module_platform_driver(bf5xx_pcm_driver); diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index d95477afcc67..6cba211da32e 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c @@ -342,13 +342,8 @@ static struct snd_soc_platform_driver bf5xx_i2s_soc_platform = { static int bfin_i2s_soc_platform_probe(struct platform_device *pdev) { - return snd_soc_register_platform(&pdev->dev, &bf5xx_i2s_soc_platform); -} - -static int bfin_i2s_soc_platform_remove(struct platform_device *pdev) -{ - snd_soc_unregister_platform(&pdev->dev); - return 0; + return devm_snd_soc_register_platform(&pdev->dev, + &bf5xx_i2s_soc_platform); } static struct platform_driver bfin_i2s_pcm_driver = { @@ -357,7 +352,6 @@ static struct platform_driver bfin_i2s_pcm_driver = { }, .probe = bfin_i2s_soc_platform_probe, - .remove = bfin_i2s_soc_platform_remove, }; module_platform_driver(bfin_i2s_pcm_driver); -- cgit