lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 19 Dec 2013 11:59:54 +0800 From: Xiubo Li <Li.Xiubo@...escale.com> To: <broonie@...nel.org>, <perex@...ex.cz>, <tiwai@...e.de> CC: <kuninori.morimoto.gx@...esas.com>, <fabio.estevam@...escale.com>, <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org> Subject: [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card() Makes the code slightly shorter. Signed-off-by: Xiubo Li <Li.Xiubo@...escale.com> --- sound/soc/generic/simple-card.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 7a9b6b4..3d190d0 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); -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists