Re: [PATCH v4 49/54] clk: mediatek: Add MODULE_DEVICE_TABLE() where appropriate

From: Miles Chen
Date: Tue Feb 21 2023 - 23:14:40 EST


Hi,

> static struct platform_driver clk_mt8195_venc_drv = {
> .probe = mtk_clk_simple_probe,
>diff --git a/drivers/clk/mediatek/clk-mt8195-vpp0.c b/drivers/clk/mediatek/clk-mt8195-vpp0.c
>index 84805a114387..3d1ad92b663e 100644
>--- a/drivers/clk/mediatek/clk-mt8195-vpp0.c
>+++ b/drivers/clk/mediatek/clk-mt8195-vpp0.c
>@@ -95,6 +95,7 @@ static const struct platform_device_id clk_mt8195_vpp0_id_table[] = {
> { .name = "clk-mt8195-vpp0", .driver_data = (kernel_ulong_t)&vpp0_desc },
> { /* sentinel */ }
> };
>+MODULE_DEVICE_TABLE(platform, of_match_clk_mt8195_vpp0);
>
> static struct platform_driver clk_mt8195_vpp0_drv = {
> .probe = mtk_clk_pdev_probe,
>diff --git a/drivers/clk/mediatek/clk-mt8195-vpp1.c b/drivers/clk/mediatek/clk-mt8195-vpp1.c
>index 3e91dfed2996..b463f8e197c6 100644
>--- a/drivers/clk/mediatek/clk-mt8195-vpp1.c
>+++ b/drivers/clk/mediatek/clk-mt8195-vpp1.c
>@@ -93,6 +93,7 @@ static const struct platform_device_id clk_mt8195_vpp1_id_table[] = {
> { .name = "clk-mt8195-vpp1", .driver_data = (kernel_ulong_t)&vpp1_desc },
> { /* sentinel */ }
> };
>+MODULE_DEVICE_TABLE(platform, of_match_clk_mt8195_vpp1);

I got the following build break with ARCH=arm64 allmodconfig:
Do I miss something?

linux-next/drivers/clk/mediatek/clk-mt8195-vpp0.c:98:31: error: 'of_match_clk_mt8195_vpp0' undeclared here (not in a function)
linux-next/drivers/clk/mediatek/clk-mt8195-vpp1.c:96:31: error: 'of_match_clk_mt8195_vpp1' undeclared here (not in a function)

ARCH=arm64 allyesconfig, defconfig: passed

thanks,
Miles