diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2013-12-19 11:59:54 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-19 10:23:04 +0000 |
commit | e1acb40a3addc9aceb4600f04c9c86b50770b9b8 (patch) | |
tree | b94a9de730ff57573759181a39484eef33fb3c95 /sound/soc/generic | |
parent | fa558c2801fc173758c742d836f3cc4621851557 (diff) |
ASoC: simple-card: Use devm_snd_soc_register_card()
Makes the code slightly shorter.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r-- | sound/soc/generic/simple-card.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 7a9b6b4898c0..3d190d05ad4a 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -234,14 +234,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) cinfo->snd_card.num_links = 1; cinfo->snd_card.dev = &pdev->dev; - return snd_soc_register_card(&cinfo->snd_card); -} - -static int asoc_simple_card_remove(struct platform_device *pdev) -{ - struct asoc_simple_card_info *cinfo = pdev->dev.platform_data; - - return snd_soc_unregister_card(&cinfo->snd_card); + return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card); } static const struct of_device_id asoc_simple_of_match[] = { @@ -257,7 +250,6 @@ static struct platform_driver asoc_simple_card = { .of_match_table = asoc_simple_of_match, }, .probe = asoc_simple_card_probe, - .remove = asoc_simple_card_remove, }; module_platform_driver(asoc_simple_card); |