diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-17 04:12:46 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-19 13:57:37 (GMT) |
commit | 01984a47e21a7d36cea0d6c0933c8173391721fc (patch) | |
tree | 67218b790f51462d7c6781f3e3db7894929bae75 /sound/soc/fsl | |
parent | 0e4ff5c806263bf40ee5409ac283b776f0c11e41 (diff) | |
download | linux-fsl-qoriq-01984a47e21a7d36cea0d6c0933c8173391721fc.tar.xz |
ASoC: imx-sgtl5000: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 46c5b4f..78f86d8 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -159,7 +159,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) data->card.dapm_widgets = imx_sgtl5000_dapm_widgets; data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets); - ret = snd_soc_register_card(&data->card); + ret = devm_snd_soc_register_card(&pdev->dev, &data->card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); goto fail; @@ -180,15 +180,6 @@ fail: return ret; } -static int imx_sgtl5000_remove(struct platform_device *pdev) -{ - struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); - - snd_soc_unregister_card(&data->card); - - return 0; -} - static const struct of_device_id imx_sgtl5000_dt_ids[] = { { .compatible = "fsl,imx-audio-sgtl5000", }, { /* sentinel */ } @@ -202,7 +193,6 @@ static struct platform_driver imx_sgtl5000_driver = { .of_match_table = imx_sgtl5000_dt_ids, }, .probe = imx_sgtl5000_probe, - .remove = imx_sgtl5000_remove, }; module_platform_driver(imx_sgtl5000_driver); |