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/sgtl5000.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index a635bd0..77b9244 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1083,9 +1083,10 @@ static int sgtl5000_enable_regulators(struct i2c_client *client) return ret; }
-static int sgtl5000_probe(struct snd_soc_codec *codec) +static int sgtl5000_probe(struct snd_soc_component *component) { int ret; + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
/* power up sgtl5000 */ @@ -1141,17 +1142,11 @@ err: return ret; }
-static int sgtl5000_remove(struct snd_soc_codec *codec) -{ - return 0; -} - static struct snd_soc_codec_driver sgtl5000_driver = { - .probe = sgtl5000_probe, - .remove = sgtl5000_remove, .set_bias_level = sgtl5000_set_bias_level, .suspend_bias_off = true, .component_driver = { + .probe = sgtl5000_probe, .controls = sgtl5000_snd_controls, .num_controls = ARRAY_SIZE(sgtl5000_snd_controls), .dapm_widgets = sgtl5000_dapm_widgets,