[PATCH v5 12/12] ASoC: soc-core: remove dev from soc_component_initialize()

Kuninori Morimoto <[email protected]>
Newsgroups org.kernel.vger.linux-sound
Message-ID <[email protected]>
Component already has component->dev. No longer need to set dev
on soc_component_initialize(). Remove it.

Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Cezary Rojewski <[email protected]>
---
 sound/soc/soc-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f1368bfe3fa4e..8aaf85db0ea5c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2703,9 +2703,10 @@ static void snd_soc_del_component_unlocked(struct snd_soc_component *component)
 }
 
 static int soc_component_initialize(struct snd_soc_component *component,
-				    const struct snd_soc_component_driver *driver,
-				    struct device *dev)
+				    const struct snd_soc_component_driver *driver)
 {
+	struct device *dev = component->dev;
+
 	component->dapm = snd_soc_dapm_alloc(dev);
 	if (!component->dapm)
 		return -ENOMEM;
@@ -2725,7 +2726,6 @@ static int soc_component_initialize(struct snd_soc_component *component,
 		}
 	}
 
-	component->dev		= dev;
 	component->driver	= driver;
 
 	return 0;
@@ -2780,7 +2780,7 @@ int snd_soc_register_component_c(struct snd_soc_component *component,
 {
 	int ret;
 
-	ret = soc_component_initialize(component, component_driver, component->dev);
+	ret = soc_component_initialize(component, component_driver);
 	if (ret < 0)
 		return ret;
 
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.