Skip to content

Commit

Permalink
ASoC: smdk_wm8994: Use devm_snd_soc_unregister_card()
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Sep 16, 2013
1 parent e3c51ca commit 9a8e032
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions sound/soc/samsung/smdk_wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,31 +193,21 @@ static int smdk_audio_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, board);

ret = snd_soc_register_card(card);
ret = devm_snd_soc_register_card(&pdev->dev, card);

if (ret)
dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret);

return ret;
}

static int smdk_audio_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);

snd_soc_unregister_card(card);

return 0;
}

static struct platform_driver smdk_audio_driver = {
.driver = {
.name = "smdk-audio-wm8894",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(samsung_wm8994_of_match),
},
.probe = smdk_audio_probe,
.remove = smdk_audio_remove,
};

module_platform_driver(smdk_audio_driver);
Expand Down

0 comments on commit 9a8e032

Please sign in to comment.