aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-wm8962.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/imx-wm8962.c')
-rw-r--r--sound/soc/fsl/imx-wm8962.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index 722afe69169e..361f94f09b11 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx-wm8962.c
@@ -266,7 +266,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
266 data->card.late_probe = imx_wm8962_late_probe; 266 data->card.late_probe = imx_wm8962_late_probe;
267 data->card.set_bias_level = imx_wm8962_set_bias_level; 267 data->card.set_bias_level = imx_wm8962_set_bias_level;
268 268
269 ret = snd_soc_register_card(&data->card); 269 ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
270 if (ret) { 270 if (ret) {
271 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); 271 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
272 goto clk_fail; 272 goto clk_fail;
@@ -279,8 +279,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
279 return 0; 279 return 0;
280 280
281clk_fail: 281clk_fail:
282 if (!IS_ERR(data->codec_clk)) 282 clk_disable_unprepare(data->codec_clk);
283 clk_disable_unprepare(data->codec_clk);
284fail: 283fail:
285 if (ssi_np) 284 if (ssi_np)
286 of_node_put(ssi_np); 285 of_node_put(ssi_np);
@@ -296,7 +295,6 @@ static int imx_wm8962_remove(struct platform_device *pdev)
296 295
297 if (!IS_ERR(data->codec_clk)) 296 if (!IS_ERR(data->codec_clk))
298 clk_disable_unprepare(data->codec_clk); 297 clk_disable_unprepare(data->codec_clk);
299 snd_soc_unregister_card(&data->card);
300 298
301 return 0; 299 return 0;
302} 300}
@@ -311,6 +309,7 @@ static struct platform_driver imx_wm8962_driver = {
311 .driver = { 309 .driver = {
312 .name = "imx-wm8962", 310 .name = "imx-wm8962",
313 .owner = THIS_MODULE, 311 .owner = THIS_MODULE,
312 .pm = &snd_soc_pm_ops,
314 .of_match_table = imx_wm8962_dt_ids, 313 .of_match_table = imx_wm8962_dt_ids,
315 }, 314 },
316 .probe = imx_wm8962_probe, 315 .probe = imx_wm8962_probe,