aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/fsl/imx-sgtl5000.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 46c5b4fdfc52..78f86d870b11 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)
159 data->card.dapm_widgets = imx_sgtl5000_dapm_widgets; 159 data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
160 data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets); 160 data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);
161 161
162 ret = snd_soc_register_card(&data->card); 162 ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
163 if (ret) { 163 if (ret) {
164 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); 164 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
165 goto fail; 165 goto fail;
@@ -180,15 +180,6 @@ fail:
180 return ret; 180 return ret;
181} 181}
182 182
183static int imx_sgtl5000_remove(struct platform_device *pdev)
184{
185 struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
186
187 snd_soc_unregister_card(&data->card);
188
189 return 0;
190}
191
192static const struct of_device_id imx_sgtl5000_dt_ids[] = { 183static const struct of_device_id imx_sgtl5000_dt_ids[] = {
193 { .compatible = "fsl,imx-audio-sgtl5000", }, 184 { .compatible = "fsl,imx-audio-sgtl5000", },
194 { /* sentinel */ } 185 { /* sentinel */ }
@@ -202,7 +193,6 @@ static struct platform_driver imx_sgtl5000_driver = {
202 .of_match_table = imx_sgtl5000_dt_ids, 193 .of_match_table = imx_sgtl5000_dt_ids,
203 }, 194 },
204 .probe = imx_sgtl5000_probe, 195 .probe = imx_sgtl5000_probe,
205 .remove = imx_sgtl5000_remove,
206}; 196};
207module_platform_driver(imx_sgtl5000_driver); 197module_platform_driver(imx_sgtl5000_driver);
208 198