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/inno_rk3036.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c index b918ba5..6890581 100644 --- a/sound/soc/codecs/inno_rk3036.c +++ b/sound/soc/codecs/inno_rk3036.c @@ -338,16 +338,20 @@ static void rk3036_codec_reset(struct snd_soc_codec *codec) INNO_R00_CSR_WORK | INNO_R00_CDCR_WORK); }
-static int rk3036_codec_probe(struct snd_soc_codec *codec) +static int rk3036_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); + rk3036_codec_reset(codec); + return 0; }
-static int rk3036_codec_remove(struct snd_soc_codec *codec) +static void rk3036_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); + rk3036_codec_reset(codec); - return 0; }
static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec, @@ -377,10 +381,10 @@ static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec, }
static struct snd_soc_codec_driver rk3036_codec_driver = { - .probe = rk3036_codec_probe, - .remove = rk3036_codec_remove, .set_bias_level = rk3036_codec_set_bias_level, .component_driver = { + .probe = rk3036_codec_probe, + .remove = rk3036_codec_remove, .controls = rk3036_codec_dapm_controls, .num_controls = ARRAY_SIZE(rk3036_codec_dapm_controls), .dapm_routes = rk3036_codec_dapm_routes,