[PATCH 3/4] drm/mediatek: mtk_cec: Fix non-static global variable

CK Hu (胡俊光) ck.hu at mediatek.com
Tue May 12 02:04:22 PDT 2026


On Wed, 2026-04-29 at 11:59 +0200, Louis-Alexis Eyraud wrote:
> The struct 'mtk_cec_driver' is not used outside of the
> mtk_cec.c file, so make it static to silence sparse warning:
> ```
> drivers/gpu/drm/mediatek/mtk_cec.c:243:24: sparse: warning: symbol
> 'mtk_cec_driver' was not declared. Should it be static?
> ```

Reviewed-by: CK Hu <ck.hu at mediatek.com>

> 
> Fixes: 1e914a89ab7e ("drm/mediatek: mtk_cec: Switch to register as module_platform_driver")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud at collabora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_cec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c
> index c7be530ca041..b8ccd6e55bed 100644
> --- a/drivers/gpu/drm/mediatek/mtk_cec.c
> +++ b/drivers/gpu/drm/mediatek/mtk_cec.c
> @@ -240,7 +240,7 @@ static const struct of_device_id mtk_cec_of_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, mtk_cec_of_ids);
>  
> -struct platform_driver mtk_cec_driver = {
> +static struct platform_driver mtk_cec_driver = {
>  	.probe = mtk_cec_probe,
>  	.remove = mtk_cec_remove,
>  	.driver = {
> 



More information about the Linux-mediatek mailing list