diff options
Diffstat (limited to 'sound/soc/davinci/davinci-vcif.c')
-rw-r--r-- | sound/soc/davinci/davinci-vcif.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index fabd05f24aeb..c77d9218795a 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c | |||
@@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev) | |||
231 | 231 | ||
232 | dev_set_drvdata(&pdev->dev, davinci_vcif_dev); | 232 | dev_set_drvdata(&pdev->dev, davinci_vcif_dev); |
233 | 233 | ||
234 | ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component, | 234 | ret = devm_snd_soc_register_component(&pdev->dev, |
235 | &davinci_vcif_dai, 1); | 235 | &davinci_vcif_component, |
236 | &davinci_vcif_dai, 1); | ||
236 | if (ret != 0) { | 237 | if (ret != 0) { |
237 | dev_err(&pdev->dev, "could not register dai\n"); | 238 | dev_err(&pdev->dev, "could not register dai\n"); |
238 | return ret; | 239 | return ret; |
@@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev) | |||
241 | ret = edma_pcm_platform_register(&pdev->dev); | 242 | ret = edma_pcm_platform_register(&pdev->dev); |
242 | if (ret) { | 243 | if (ret) { |
243 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); | 244 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); |
244 | snd_soc_unregister_component(&pdev->dev); | ||
245 | return ret; | 245 | return ret; |
246 | } | 246 | } |
247 | 247 | ||
248 | return 0; | 248 | return 0; |
249 | } | 249 | } |
250 | 250 | ||
251 | static int davinci_vcif_remove(struct platform_device *pdev) | ||
252 | { | ||
253 | snd_soc_unregister_component(&pdev->dev); | ||
254 | |||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | static struct platform_driver davinci_vcif_driver = { | 251 | static struct platform_driver davinci_vcif_driver = { |
259 | .probe = davinci_vcif_probe, | 252 | .probe = davinci_vcif_probe, |
260 | .remove = davinci_vcif_remove, | ||
261 | .driver = { | 253 | .driver = { |
262 | .name = "davinci-vcif", | 254 | .name = "davinci-vcif", |
263 | }, | 255 | }, |