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/da7219.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index b6411bd..31cf5e8 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1630,8 +1630,9 @@ static struct reg_sequence da7219_rev_aa_patch[] = { { DA7219_REFERENCES, 0x08 }, };
-static int da7219_probe(struct snd_soc_codec *codec) +static int da7219_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); unsigned int rev; int ret; @@ -1718,14 +1719,15 @@ err_disable_reg: return ret; }
-static int da7219_remove(struct snd_soc_codec *codec) +static void da7219_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec);
da7219_aad_exit(codec);
/* Supplies */ - return regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies); + regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies); }
#ifdef CONFIG_PM @@ -1761,13 +1763,13 @@ static int da7219_resume(struct snd_soc_codec *codec) #endif
static struct snd_soc_codec_driver soc_codec_dev_da7219 = { - .probe = da7219_probe, - .remove = da7219_remove, .suspend = da7219_suspend, .resume = da7219_resume, .set_bias_level = da7219_set_bias_level,
.component_driver = { + .probe = da7219_probe, + .remove = da7219_remove, .controls = da7219_snd_controls, .num_controls = ARRAY_SIZE(da7219_snd_controls), .dapm_widgets = da7219_dapm_widgets,