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/wm8350.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 18bc4ca..9415da3 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1455,8 +1455,9 @@ static struct snd_soc_dai_driver wm8350_dai = { .ops = &wm8350_dai_ops, }; -static int wm8350_codec_probe(struct snd_soc_codec *codec) +static int wm8350_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm8350 *wm8350 = dev_get_platdata(codec->dev); struct wm8350_data *priv; struct wm8350_output *out1; @@ -1550,8 +1551,9 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) return 0; } -static int wm8350_codec_remove(struct snd_soc_codec *codec) +static void wm8350_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); struct wm8350 *wm8350 = dev_get_platdata(codec->dev); @@ -1576,8 +1578,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) flush_delayed_work(&priv->pga_work); wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA); - - return 0; } static struct regmap *wm8350_get_regmap(struct device *dev) @@ -1588,13 +1588,13 @@ static struct regmap *wm8350_get_regmap(struct device *dev) } static struct snd_soc_codec_driver soc_codec_dev_wm8350 = { - .probe = wm8350_codec_probe, - .remove = wm8350_codec_remove, .get_regmap = wm8350_get_regmap, .set_bias_level = wm8350_set_bias_level, .suspend_bias_off = true, .component_driver = { + .probe = wm8350_codec_probe, + .remove = wm8350_codec_remove, .controls = wm8350_snd_controls, .num_controls = ARRAY_SIZE(wm8350_snd_controls), .dapm_widgets = wm8350_dapm_widgets, -- 1.9.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel