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 <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87se2sel1q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-09-29 04:30:41 +00:00 committed by Mark Brown
parent c53791d673
commit 80ffb82a72

View File

@ -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,