diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2013-05-17 11:26:15 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-17 12:07:49 +0100 |
commit | 7d0cd22382f80243e7fce16f6bfc0720d5688370 (patch) | |
tree | 4a30f662fb45e59de7ac0155d2eb7c1e6b42d171 /sound/soc/soc-utils.c | |
parent | 2b581074357c42f63ae827ee28c9f244b91a38ac (diff) |
ASoC: simplify registration of snd-soc-dummy device
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r-- | sound/soc/soc-utils.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index 4b3be6c3c91e..29b211e9c060 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -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) |