提交 7d0cd223 编写于 作者: U Uwe Kleine-König 提交者: Mark Brown

ASoC: simplify registration of snd-soc-dummy device

Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 2b581074
......@@ -159,15 +159,10 @@ int __init snd_soc_util_init(void)
{
int ret;
soc_dummy_dev = platform_device_alloc("snd-soc-dummy", -1);
if (!soc_dummy_dev)
return -ENOMEM;
ret = platform_device_add(soc_dummy_dev);
if (ret != 0) {
platform_device_put(soc_dummy_dev);
return ret;
}
soc_dummy_dev =
platform_device_register_simple("snd-soc-dummy", -1, NULL, 0);
if (IS_ERR(soc_dummy_dev))
return PTR_ERR(soc_dummy_dev);
ret = platform_driver_register(&soc_dummy_driver);
if (ret != 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册