summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-08-17 11:28:35 +0200
committerMark Brown <broonie@linaro.org>2014-08-17 08:22:18 -0500
commitf294afed03b154fbfaa9a32a0ebe7abdbf98070c (patch)
tree17903a1aaef3f5c5abcb704ad43f0672ffdedbf6 /sound
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
downloadlinux-f294afed03b154fbfaa9a32a0ebe7abdbf98070c.tar.bz2
ASoC: Use dev_set_name() instead of init_name
init_name is basically a hack and should only be used for statically allocated device structs. For dynamically allocated devices dev_set_name() should be used. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d4bfd4a9076f..889f4e3d35dc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1325,7 +1325,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
device_initialize(rtd->dev);
rtd->dev->parent = rtd->card->dev;
rtd->dev->release = rtd_release;
- rtd->dev->init_name = name;
+ dev_set_name(rtd->dev, "%s", name);
dev_set_drvdata(rtd->dev, rtd);
mutex_init(&rtd->pcm_mutex);
INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients);