Skip to content

Commit

Permalink
ASoC: samsung-i2s: Use devm_snd_soc_register_component()
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 9a8e032 commit d644a11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,9 +1143,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Unable to get drvdata\n");
return -EFAULT;
}
snd_soc_register_component(&sec_dai->pdev->dev,
&samsung_i2s_component,
&sec_dai->i2s_dai_drv, 1);
devm_snd_soc_register_component(&sec_dai->pdev->dev,
&samsung_i2s_component,
&sec_dai->i2s_dai_drv, 1);
samsung_asoc_dma_platform_register(&pdev->dev);
return 0;
}
Expand Down Expand Up @@ -1258,8 +1258,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
goto err;
}

snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component,
&pri_dai->i2s_dai_drv, 1);
devm_snd_soc_register_component(&pri_dai->pdev->dev,
&samsung_i2s_component,
&pri_dai->i2s_dai_drv, 1);

pm_runtime_enable(&pdev->dev);

Expand Down Expand Up @@ -1294,7 +1295,6 @@ static int samsung_i2s_remove(struct platform_device *pdev)
i2s->sec_dai = NULL;

samsung_asoc_dma_platform_unregister(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);

return 0;
}
Expand Down

0 comments on commit d644a11

Please sign in to comment.