[PATCH] drm/sun4i: Don't include <linux/mod_devicetable.h>
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Mon Nov 30 13:24:29 PST 2026
<linux/mod_devicetable.h> provides many *_device_id structs, the sun4i
drm driver only uses struct of_device_id. (See
git grep -oE "\<(acpi_device_id|amba_id|ap_device_id|apr_device_id|auxiliary_device_id|bcma_device_id|ccw_device_id|cdx_device_id|coreboot_device_id|css_device_id|dfl_device_id|dmi_(device|system)_id|eisa_device_id|fsl_mc_device_id|hda_device_id|hid_device_id|hv_vmbus_device_id|i2c_device_id|i3c_device_id|ieee1394_device_id|input_device_id|ipack_device_id|isapnp_device_id|ishtp_device_id|mcb_device_id|mdio_device_id|mei_cl_device_id|mhi_device_id|mips_cdmm_device_id|of_device_id|parisc_device_id|pci_device_id|pci_epf_device_id|pcmcia_device_id|platform_device_id|pnp_(card_)?device_id|rio_device_id|rpmsg_device_id|sdio_device_id|sdw_device_id|serio_device_id|slim_device_id|spi_device_id|spmi_device_id|ssam_device_id|ssb_device_id|tb_service_id|tee_client_device_id|typec_device_id|ulpi_device_id|usb_device_id|vchiq_device_id|vio_device_id|virtio_device_id|wmi_device_id|x86_(cpu|device)_id|zorro_device_id|cpu_feature)\>" drivers/gpu/drm/sun4i/
.)
So only include <linux/device-id/of.h> which is enough to provide
struct of_device_id and doesn't introduce all the other structs and thus
reduces the build dependencies.
With the goal to remove <linux/mod_devicetable.h> this brings us one
step further.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
---
drivers/gpu/drm/sun4i/sun4i_frontend.h | 2 +-
drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.h b/drivers/gpu/drm/sun4i/sun4i_frontend.h
index 61c24088772c..760590f67862 100644
--- a/drivers/gpu/drm/sun4i/sun4i_frontend.h
+++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h
@@ -8,7 +8,7 @@
#define _SUN4I_FRONTEND_H_
#include <linux/list.h>
-#include <linux/mod_devicetable.h>
+#include <linux/device-id/of.h>
#define SUN4I_FRONTEND_EN_REG 0x000
#define SUN4I_FRONTEND_EN_EN BIT(0)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index fa23aa23fe4a..ee2c9927a941 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/list.h>
-#include <linux/mod_devicetable.h>
+#include <linux/device-id/of.h>
#include <linux/reset.h>
#define SUN4I_TCON_GCTL_REG 0x0
base-commit: 253f86660c1f882fbf554db5eaa34bc5d66dc7e8
--
2.47.3
More information about the linux-arm-kernel
mailing list