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/tas5720.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c index c65b917..d531ffd 100644 --- a/sound/soc/codecs/tas5720.c +++ b/sound/soc/codecs/tas5720.c @@ -261,8 +261,9 @@ out: msecs_to_jiffies(TAS5720_FAULT_CHECK_INTERVAL)); } -static int tas5720_codec_probe(struct snd_soc_codec *codec) +static int tas5720_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec); unsigned int device_id; int ret; @@ -320,8 +321,9 @@ probe_fail: return ret; } -static int tas5720_codec_remove(struct snd_soc_codec *codec) +static void tas5720_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec); int ret; @@ -331,8 +333,6 @@ static int tas5720_codec_remove(struct snd_soc_codec *codec) tas5720->supplies); if (ret < 0) dev_err(codec->dev, "failed to disable supplies: %d\n", ret); - - return ret; }; static int tas5720_dac_event(struct snd_soc_dapm_widget *w, @@ -484,12 +484,12 @@ static const struct snd_soc_dapm_route tas5720_audio_map[] = { }; static struct snd_soc_codec_driver soc_codec_dev_tas5720 = { - .probe = tas5720_codec_probe, - .remove = tas5720_codec_remove, .suspend = tas5720_suspend, .resume = tas5720_resume, .component_driver = { + .probe = tas5720_codec_probe, + .remove = tas5720_codec_remove, .controls = tas5720_snd_controls, .num_controls = ARRAY_SIZE(tas5720_snd_controls), .dapm_widgets = tas5720_dapm_widgets, -- 1.9.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel