From: Lars-Peter Clausen Date: Sun, 17 Aug 2014 09:28:35 +0000 (+0200) Subject: ASoC: Use dev_set_name() instead of init_name X-Git-Tag: v3.17-rc4~24^2^2~1^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f294afed03b154fbfaa9a32a0ebe7abdbf98070c;p=karo-tx-linux.git 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 Signed-off-by: Mark Brown --- 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);