diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-17 00:19:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-19 09:57:37 -0400 |
commit | 33c89c30afd7b6a309638d8d9b88481118d0a3ec (patch) | |
tree | 54a98f7dd7f80091dce5ed6fe3ce564b0234f74d | |
parent | eafbae2919e24b6ed7078464b2c8b2313ac0252c (diff) |
ASoC: mfld: 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>
-rw-r--r-- | sound/soc/mid-x86/mfld_machine.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c index ee363845759e..d3d4c32434f7 100644 --- a/sound/soc/mid-x86/mfld_machine.c +++ b/sound/soc/mid-x86/mfld_machine.c | |||
@@ -400,7 +400,7 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) | |||
400 | } | 400 | } |
401 | /* register the soc card */ | 401 | /* register the soc card */ |
402 | snd_soc_card_mfld.dev = &pdev->dev; | 402 | snd_soc_card_mfld.dev = &pdev->dev; |
403 | ret_val = snd_soc_register_card(&snd_soc_card_mfld); | 403 | ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_mfld); |
404 | if (ret_val) { | 404 | if (ret_val) { |
405 | pr_debug("snd_soc_register_card failed %d\n", ret_val); | 405 | pr_debug("snd_soc_register_card failed %d\n", ret_val); |
406 | return ret_val; | 406 | return ret_val; |
@@ -410,20 +410,12 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) | |||
410 | return 0; | 410 | return 0; |
411 | } | 411 | } |
412 | 412 | ||
413 | static int snd_mfld_mc_remove(struct platform_device *pdev) | ||
414 | { | ||
415 | pr_debug("snd_mfld_mc_remove called\n"); | ||
416 | snd_soc_unregister_card(&snd_soc_card_mfld); | ||
417 | return 0; | ||
418 | } | ||
419 | |||
420 | static struct platform_driver snd_mfld_mc_driver = { | 413 | static struct platform_driver snd_mfld_mc_driver = { |
421 | .driver = { | 414 | .driver = { |
422 | .owner = THIS_MODULE, | 415 | .owner = THIS_MODULE, |
423 | .name = "msic_audio", | 416 | .name = "msic_audio", |
424 | }, | 417 | }, |
425 | .probe = snd_mfld_mc_probe, | 418 | .probe = snd_mfld_mc_probe, |
426 | .remove = snd_mfld_mc_remove, | ||
427 | }; | 419 | }; |
428 | 420 | ||
429 | module_platform_driver(snd_mfld_mc_driver); | 421 | module_platform_driver(snd_mfld_mc_driver); |