From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> 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@xxxxxxxxxxx> --- sound/soc/codecs/rt286.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 9c365a7..ecd35fb 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -937,8 +937,9 @@ static irqreturn_t rt286_irq(int irq, void *data) return IRQ_HANDLED; } -static int rt286_probe(struct snd_soc_codec *codec) +static int rt286_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); rt286->codec = codec; @@ -956,13 +957,12 @@ static int rt286_probe(struct snd_soc_codec *codec) return 0; } -static int rt286_remove(struct snd_soc_codec *codec) +static void rt286_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); cancel_delayed_work_sync(&rt286->jack_detect_work); - - return 0; } #ifdef CONFIG_PM @@ -1047,13 +1047,13 @@ static struct snd_soc_dai_driver rt286_dai[] = { }; static struct snd_soc_codec_driver soc_codec_dev_rt286 = { - .probe = rt286_probe, - .remove = rt286_remove, .suspend = rt286_suspend, .resume = rt286_resume, .set_bias_level = rt286_set_bias_level, .idle_bias_off = true, .component_driver = { + .probe = rt286_probe, + .remove = rt286_remove, .controls = rt286_snd_controls, .num_controls = ARRAY_SIZE(rt286_snd_controls), .dapm_widgets = rt286_dapm_widgets, -- 1.9.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel