From 80ffb82a72d80b4a633621dfc45c7cd233a2fe8c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 29 Sep 2026 04:30:41 +0000 Subject: [PATCH] ASoC: codecs: twl4030: tidyup twl4030_soc_probe() twl4030_soc_probe() (Z) gets drvdata from Component dev (A), and set it to Component dev again (B) (= snd_soc_component_set_drvdata() calls dev_set_drvdata() inside). It is point less. Let's remove (A)(B) and rename twl4030_init_chip() (C) to twl4030_soc_probe() (Z). (Z) static int twl4030_soc_probe(...) { (A) struct twl4030_priv *twl4030 = dev_get_drvdata(component->dev); (B) snd_soc_component_set_drvdata(component, twl4030); (C) return twl4030_init_chip(component); } Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87se2sel1q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/codecs/twl4030.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 442624cf2a31..7117af5a1a56 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -275,7 +275,7 @@ static int twl4030_get_hw_params(struct device *dev, return 0; } -static int twl4030_init_chip(struct snd_soc_component *component) +static int twl4030_soc_probe(struct snd_soc_component *component) { struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); struct twl4030_board_params *board_params = twl4030->board_params; @@ -2172,15 +2172,6 @@ static struct snd_soc_dai_driver twl4030_dai[] = { }, }; -static int twl4030_soc_probe(struct snd_soc_component *component) -{ - struct twl4030_priv *twl4030 = dev_get_drvdata(component->dev); - - snd_soc_component_set_drvdata(component, twl4030); - - return twl4030_init_chip(component); -} - static const struct snd_soc_component_driver soc_component_dev_twl4030 = { .probe = twl4030_soc_probe, .read = twl4030_read,