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/wm5110.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 3e7f873..cec5f4d 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2258,8 +2258,9 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data) return IRQ_HANDLED; }
-static int wm5110_codec_probe(struct snd_soc_codec *codec) +static int wm5110_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona *arizona = priv->core.arizona; @@ -2305,8 +2306,9 @@ err_adsp2_codec_probe: return ret; }
-static int wm5110_codec_remove(struct snd_soc_codec *codec) +static void wm5110_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona *arizona = priv->core.arizona; int i; @@ -2319,8 +2321,6 @@ static int wm5110_codec_remove(struct snd_soc_codec *codec) arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
arizona_free_spk(codec); - - return 0; }
#define WM5110_DIG_VU 0x0200 @@ -2348,8 +2348,6 @@ static struct regmap *wm5110_get_regmap(struct device *dev) }
static struct snd_soc_codec_driver soc_codec_dev_wm5110 = { - .probe = wm5110_codec_probe, - .remove = wm5110_codec_remove, .get_regmap = wm5110_get_regmap,
.idle_bias_off = true, @@ -2358,6 +2356,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5110 = { .set_pll = wm5110_set_fll,
.component_driver = { + .probe = wm5110_codec_probe, + .remove = wm5110_codec_remove, .controls = wm5110_snd_controls, .num_controls = ARRAY_SIZE(wm5110_snd_controls), .dapm_widgets = wm5110_dapm_widgets,