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/88pm860x-codec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index b013a4c..686eb7d7 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -1313,8 +1313,9 @@ int pm860x_mic_jack_detect(struct snd_soc_codec *codec, } EXPORT_SYMBOL_GPL(pm860x_mic_jack_detect); -static int pm860x_probe(struct snd_soc_codec *codec) +static int pm860x_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct pm860x_priv *pm860x = snd_soc_codec_get_drvdata(codec); int i, ret; @@ -1338,14 +1339,14 @@ out: return ret; } -static int pm860x_remove(struct snd_soc_codec *codec) +static void pm860x_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct pm860x_priv *pm860x = snd_soc_codec_get_drvdata(codec); int i; for (i = 3; i >= 0; i--) free_irq(pm860x->irq[i], pm860x); - return 0; } static struct regmap *pm860x_get_regmap(struct device *dev) @@ -1356,12 +1357,12 @@ static struct regmap *pm860x_get_regmap(struct device *dev) } static struct snd_soc_codec_driver soc_codec_dev_pm860x = { - .probe = pm860x_probe, - .remove = pm860x_remove, .set_bias_level = pm860x_set_bias_level, .get_regmap = pm860x_get_regmap, .component_driver = { + .probe = pm860x_probe, + .remove = pm860x_remove, .controls = pm860x_snd_controls, .num_controls = ARRAY_SIZE(pm860x_snd_controls), .dapm_widgets = pm860x_dapm_widgets, -- 1.9.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel