diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-02 22:16:19 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-03 13:59:56 +0100 |
commit | 6522a8486c00d130a32a57c6c8a365572958b4df (patch) | |
tree | 07dc2592d374c33ccc471cc52cc8f050f46324a0 /sound/soc/atmel | |
parent | ae624a38be37e1a3127d5fa32c996e09974bb88d (diff) | |
download | linux-6522a8486c00d130a32a57c6c8a365572958b4df.tar.bz2 |
ASoC: atmel: sam9x5_wm8731: use devm_snd_soc_register_card()
Using devm_snd_soc_register_card() can make the code
shorter and cleaner.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210602141619.323286-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/atmel')
-rw-r--r-- | sound/soc/atmel/sam9x5_wm8731.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 9fbc3c1113cc..7745250fd743 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c @@ -159,7 +159,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) of_node_put(codec_np); of_node_put(cpu_np); - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "Platform device allocation failed\n"); goto out_put_audio; @@ -180,7 +180,6 @@ static int sam9x5_wm8731_driver_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct sam9x5_drvdata *priv = card->drvdata; - snd_soc_unregister_card(card); atmel_ssc_put_audio(priv->ssc_id); return 0; |