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/wm2000.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 1ebaf99..bcc3965 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -782,8 +782,9 @@ static const struct regmap_config wm2000_regmap = { .readable_reg = wm2000_readable_reg, };
-static int wm2000_probe(struct snd_soc_codec *codec) +static int wm2000_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
/* This will trigger a transition to standby mode by default */ @@ -792,20 +793,21 @@ static int wm2000_probe(struct snd_soc_codec *codec) return 0; }
-static int wm2000_remove(struct snd_soc_codec *codec) +static void wm2000_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
- return wm2000_anc_transition(wm2000, ANC_OFF); + wm2000_anc_transition(wm2000, ANC_OFF); }
static struct snd_soc_codec_driver soc_codec_dev_wm2000 = { - .probe = wm2000_probe, - .remove = wm2000_remove, .suspend = wm2000_suspend, .resume = wm2000_resume,
.component_driver = { + .probe = wm2000_probe, + .remove = wm2000_remove, .controls = wm2000_controls, .num_controls = ARRAY_SIZE(wm2000_controls), .dapm_widgets = wm2000_dapm_widgets,