Commit f294afed authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7d1311b9
...@@ -1325,7 +1325,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd, ...@@ -1325,7 +1325,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
device_initialize(rtd->dev); device_initialize(rtd->dev);
rtd->dev->parent = rtd->card->dev; rtd->dev->parent = rtd->card->dev;
rtd->dev->release = rtd_release; rtd->dev->release = rtd_release;
rtd->dev->init_name = name; dev_set_name(rtd->dev, "%s", name);
dev_set_drvdata(rtd->dev, rtd); dev_set_drvdata(rtd->dev, rtd);
mutex_init(&rtd->pcm_mutex); mutex_init(&rtd->pcm_mutex);
INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients); INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment