Re: [PATCH v8 1/3] ASoC: hdmi-codec: Use set_jack ops to set jack

From: Tzung-Bi Shih
Date: Fri Sep 11 2020 - 03:05:55 EST


On Thu, Sep 10, 2020 at 1:24 PM Cheng-Yi Chiang <cychiang@xxxxxxxxxxxx> wrote:
> diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
> index 8c6f540533ba..d1de5bcd5daa 100644
> --- a/sound/soc/codecs/hdmi-codec.c
> +++ b/sound/soc/codecs/hdmi-codec.c
> @@ -698,13 +698,9 @@ static void plugged_cb(struct device *dev, bool plugged)
> hdmi_codec_jack_report(hcp, 0);
> }
>
> -/**
> - * hdmi_codec_set_jack_detect - register HDMI plugged callback
> - * @component: the hdmi-codec instance
> - * @jack: ASoC jack to report (dis)connection events on
> - */
> -int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
> - struct snd_soc_jack *jack)
> +static int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
> + struct snd_soc_jack *jack,
> + void *data)
To be neat, name it "hdmi_codec_set_jack".

> static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai)
> {
> @@ -806,6 +801,7 @@ static const struct snd_soc_component_driver hdmi_driver = {
> .use_pmdown_time = 1,
> .endianness = 1,
> .non_legacy_dai_naming = 1,
> + .set_jack = hdmi_codec_set_jack_detect,
"hdmi_codec_set_jack" looks better to me.

If you would send a newer version, consider changing the name.

With that:
Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>