<html><body><p>
<pre>
Hi, Angelo:
On Tue, 2024-12-17 at 16:43 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> In preparation for splitting common bits of this driver, move the
> mutex-protected cable plugged callback and codec device setting
> to a new function called mtk_hdmi_audio_set_plugged_cb().
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index a927d9889818..f60c4effe905 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1597,17 +1597,22 @@ static int mtk_hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
> return 0;
> }
>
> -static int mtk_hdmi_audio_hook_plugged_cb(struct device *dev, void *data,
> - hdmi_codec_plugged_cb fn,
> +static void mtk_hdmi_audio_set_plugged_cb(struct mtk_hdmi *hdmi, hdmi_codec_plugged_cb fn,
> struct device *codec_dev)
> {
> - struct mtk_hdmi *hdmi = data;
> -
> mutex_lock(&hdmi->update_plugged_status_lock);
> hdmi->plugged_cb = fn;
> hdmi->codec_dev = codec_dev;
> mutex_unlock(&hdmi->update_plugged_status_lock);
> +}
> +
> +static int mtk_hdmi_audio_hook_plugged_cb(struct device *dev, void *data,
> + hdmi_codec_plugged_cb fn,
> + struct device *codec_dev)
> +{
> + struct mtk_hdmi *hdmi = data;
>
> + mtk_hdmi_audio_set_plugged_cb(hdmi, fn, codec_dev);
> mtk_hdmi_update_plugged_status(hdmi);
>
> return 0;
> --
> 2.47.0
>
</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->