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/tlv320dac33.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index d64eac7..d5be1bc 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -1375,8 +1375,9 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, return 0; }
-static int dac33_soc_probe(struct snd_soc_codec *codec) +static int dac33_soc_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); int ret = 0;
@@ -1431,15 +1432,15 @@ err_power: return ret; }
-static int dac33_soc_remove(struct snd_soc_codec *codec) +static void dac33_soc_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
if (dac33->irq >= 0) { free_irq(dac33->irq, dac33->codec); destroy_workqueue(dac33->dac33_wq); } - return 0; }
static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { @@ -1450,10 +1451,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { .reg_cache_size = ARRAY_SIZE(dac33_reg), .reg_word_size = sizeof(u8), .reg_cache_default = dac33_reg, - .probe = dac33_soc_probe, - .remove = dac33_soc_remove,
.component_driver = { + .probe = dac33_soc_probe, + .remove = dac33_soc_remove, .controls = dac33_snd_controls, .num_controls = ARRAY_SIZE(dac33_snd_controls), .dapm_widgets = dac33_dapm_widgets,