From 98e9645a35993f8cfe99e36c9ba3e6a8c1783d78 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 11 Jan 2024 00:50:27 +0000 Subject: ASoC: ti: use devm_snd_soc_register_card() Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87zfxcwv58.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/ti/omap-hdmi.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index 29bff9e6337b..4513b527ab97 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -379,7 +379,7 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) card->num_links = 1; card->dev = dev; - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(dev, card); if (ret) { dev_err(dev, "snd_soc_register_card failed (%d)\n", ret); return ret; @@ -393,19 +393,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) return 0; } -static void omap_hdmi_audio_remove(struct platform_device *pdev) -{ - struct hdmi_audio_data *ad = platform_get_drvdata(pdev); - - snd_soc_unregister_card(ad->card); -} - static struct platform_driver hdmi_audio_driver = { .driver = { .name = DRV_NAME, }, .probe = omap_hdmi_audio_probe, - .remove_new = omap_hdmi_audio_remove, }; module_platform_driver(hdmi_audio_driver); -- cgit v1.2.3 From a4005007161c9df8fa4f44a776c624f68ec34a69 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 11 Jan 2024 00:50:34 +0000 Subject: ASoC: fsl: use devm_snd_soc_register_card() Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87y1cwwv51.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/fsl/eukrea-tlv320.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index 63f1f05da947..6be074ea0b3f 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -196,7 +196,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) } } - ret = snd_soc_register_card(&eukrea_tlv320); + ret = devm_snd_soc_register_card(&pdev->dev, &eukrea_tlv320); err: if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); @@ -205,11 +205,6 @@ err: return ret; } -static void eukrea_tlv320_remove(struct platform_device *pdev) -{ - snd_soc_unregister_card(&eukrea_tlv320); -} - static const struct of_device_id imx_tlv320_dt_ids[] = { { .compatible = "eukrea,asoc-tlv320"}, { /* sentinel */ } @@ -222,7 +217,6 @@ static struct platform_driver eukrea_tlv320_driver = { .of_match_table = imx_tlv320_dt_ids, }, .probe = eukrea_tlv320_probe, - .remove_new = eukrea_tlv320_remove, }; module_platform_driver(eukrea_tlv320_driver); -- cgit v1.2.3 From 00352af2504a90381ec733237c3ef444032d5f1f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 11 Jan 2024 00:50:44 +0000 Subject: ASoC: atmel: use devm_snd_soc_register_card() Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87wmsgwv4r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/atmel/mikroe-proto.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index 18a8760443ae..8341a6e06493 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -140,7 +140,7 @@ static int snd_proto_probe(struct platform_device *pdev) dai->dai_fmt = dai_fmt; - ret = snd_soc_register_card(&snd_proto); + ret = devm_snd_soc_register_card(&pdev->dev, &snd_proto); if (ret) dev_err_probe(&pdev->dev, ret, "snd_soc_register_card() failed\n"); @@ -155,11 +155,6 @@ put_codec_node: return ret; } -static void snd_proto_remove(struct platform_device *pdev) -{ - snd_soc_unregister_card(&snd_proto); -} - static const struct of_device_id snd_proto_of_match[] = { { .compatible = "mikroe,mikroe-proto", }, {}, @@ -172,7 +167,6 @@ static struct platform_driver snd_proto_driver = { .of_match_table = snd_proto_of_match, }, .probe = snd_proto_probe, - .remove_new = snd_proto_remove, }; module_platform_driver(snd_proto_driver); -- cgit v1.2.3