Re: [PATCH] drm/exynos: hdmi: take i2c adapter module reference

Inki Dae <[email protected]> Sun, 2 Aug 2026 14:54:41 +0900
Newsgroups org.kernel.vger.linux-samsung-soc,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <CAAQKjZPW+mHcXQJKQc7wJL=MGssBf10H_FO0S8D7uCjX48qrKg@mail.gmail.com>
Hi,

Merged. Thanks,
Inki Dae

2026=EB=85=84 7=EC=9B=94 16=EC=9D=BC (=EB=AA=A9) =EC=98=A4=ED=9B=84 10:18, =
Johan Hovold <[email protected]>=EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1:
>
> The i2c subsystem currently blocks during adapter deregistration
> whenever there are consumers holding a reference.
>
> Switch to using of_get_i2c_adapter_by_node() which also takes a
> reference to the adapter module so that an attempt to unload the module
> while in use fails gracefully instead of blocking uninterruptibly.
>
> Signed-off-by: Johan Hovold <[email protected]>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exyno=
s/exynos_hdmi.c
> index 09b2cabb236f..b971b7098a4d 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -1913,7 +1913,7 @@ static int hdmi_get_ddc_adapter(struct hdmi_context=
 *hdata)
>                 return -ENODEV;
>         }
>
> -       adpt =3D of_find_i2c_adapter_by_node(np);
> +       adpt =3D of_get_i2c_adapter_by_node(np);
>         of_node_put(np);
>
>         if (!adpt) {
> @@ -2069,7 +2069,7 @@ static int hdmi_probe(struct platform_device *pdev)
>         if (hdata->regs_hdmiphy)
>                 iounmap(hdata->regs_hdmiphy);
>  err_ddc:
> -       put_device(&hdata->ddc_adpt->dev);
> +       i2c_put_adapter(hdata->ddc_adpt);
>
>         return ret;
>  }
> @@ -2094,7 +2094,7 @@ static void hdmi_remove(struct platform_device *pde=
v)
>         if (hdata->regs_hdmiphy)
>                 iounmap(hdata->regs_hdmiphy);
>
> -       put_device(&hdata->ddc_adpt->dev);
> +       i2c_put_adapter(hdata->ddc_adpt);
>
>         drm_bridge_put(hdata->bridge);
>
> --
> 2.54.0
>
>