From 59cb08abbf61d39873f4d2e0cc50d8563e066b5d Mon Sep 17 00:00:00 2001 From: Guochun Huang Date: Wed, 27 Nov 2024 17:50:30 +0800 Subject: [PATCH] drm/rockchip: dsi2: separate the of_device_id array by different SoC Separate the process of device matching by the different SoC macro definitions, which can reduce memory usage. Signed-off-by: Guochun Huang Change-Id: Ic0f02bee51a6520e48568aecce92acf5d0ae31e4 --- drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c index 1a329f90fca1..57fd411d71f0 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c @@ -2066,13 +2066,18 @@ static const struct dw_mipi_dsi2_plat_data rk3588_mipi_dsi2_plat_data = { }; static const struct of_device_id dw_mipi_dsi2_dt_ids[] = { +#if IS_ENABLED(CONFIG_CPU_RK3576) { .compatible = "rockchip,rk3576-mipi-dsi2", .data = &rk3576_mipi_dsi2_plat_data, - }, { + }, +#endif +#if IS_ENABLED(CONFIG_CPU_RK3588) + { .compatible = "rockchip,rk3588-mipi-dsi2", .data = &rk3588_mipi_dsi2_plat_data, }, +#endif {} }; MODULE_DEVICE_TABLE(of, dw_mipi_dsi2_dt_ids);