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/wm8904.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index edd7a77..01ec4ca 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2053,8 +2053,9 @@ static void wm8904_handle_pdata(struct snd_soc_codec *codec) }
-static int wm8904_probe(struct snd_soc_codec *codec) +static int wm8904_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
switch (wm8904->devtype) { @@ -2076,21 +2077,22 @@ static int wm8904_probe(struct snd_soc_codec *codec) return 0; }
-static int wm8904_remove(struct snd_soc_codec *codec) +static void wm8904_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
kfree(wm8904->retune_mobile_texts); kfree(wm8904->drc_texts); - - return 0; }
static struct snd_soc_codec_driver soc_codec_dev_wm8904 = { - .probe = wm8904_probe, - .remove = wm8904_remove, .set_bias_level = wm8904_set_bias_level, .idle_bias_off = true, + .component_driver = { + .probe = wm8904_probe, + .remove = wm8904_remove, + }, };
static const struct regmap_config wm8904_regmap = {