From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
codec driver and component driver has duplicated .probe/.remove functions, and codec side is just relayed it. This was quick-hack, but no longer needed. This patch uses component .probe/.remove
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/codecs/cs42l52.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 0d9c4a5..067948b 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -1027,8 +1027,9 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec) CS42L52_BEEP_EN_MASK, 0); }
-static int cs42l52_probe(struct snd_soc_codec *codec) +static int cs42l52_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
regcache_cache_only(cs42l52->regmap, true); @@ -1043,20 +1044,20 @@ static int cs42l52_probe(struct snd_soc_codec *codec) return 0; }
-static int cs42l52_remove(struct snd_soc_codec *codec) +static void cs42l52_remove(struct snd_soc_component *component) { - cs42l52_free_beep(codec); + struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
- return 0; + cs42l52_free_beep(codec); }
static const struct snd_soc_codec_driver soc_codec_dev_cs42l52 = { - .probe = cs42l52_probe, - .remove = cs42l52_remove, .set_bias_level = cs42l52_set_bias_level, .suspend_bias_off = true,
.component_driver = { + .probe = cs42l52_probe, + .remove = cs42l52_remove, .controls = cs42l52_snd_controls, .num_controls = ARRAY_SIZE(cs42l52_snd_controls), .dapm_widgets = cs42l52_dapm_widgets,