[PATCH v1 1/2] serial: sc16is7xx: Drop usage of <linux/mod_devicetable.h>
From: Uwe Kleine-König
Date: Wed Nov 25 2026 - 05:08:59 EST
drivers/tty/serial/sc16is7xx.h only used of_device_id from the various
structures provided transitively by <linux/mod_devicetable.h>.
The consumers of drivers/tty/serial/sc16is7xx.h (i.e.
drivers/tty/serial/sc16is7xx{,_i2c,_spi}.c) only use of_device_id,
i2c_device_id and spi_device_id. The latter two are already provided by
<linux/i2c.h> and <linux/spi/spi.h> respectively. So it's enough to
replace the broad #include by <linux/device-id/of.h> in the header.
This reduces the amount of transitively included headers (and thus
useless build dependencies) a lot. (Supporting statistics on top of
next-20261124 for an x86_64 allmodconfig build:
before:
$ wc -l drivers/tty/serial/sc16is7xx.i drivers/tty/serial/.sc16is7xx.o.cmd
71313 drivers/tty/serial/sc16is7xx.i
1387 drivers/tty/serial/.sc16is7xx.o.cmd
after:
$ wc -l drivers/tty/serial/sc16is7xx.i drivers/tty/serial/.sc16is7xx.o.cmd
70392 drivers/tty/serial/sc16is7xx.i
1330 drivers/tty/serial/.sc16is7xx.o.cmd
)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/tty/serial/sc16is7xx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sc16is7xx.h b/drivers/tty/serial/sc16is7xx.h
index 9c584d6d3593..fb3b23ae2aff 100644
--- a/drivers/tty/serial/sc16is7xx.h
+++ b/drivers/tty/serial/sc16is7xx.h
@@ -4,7 +4,7 @@
#ifndef _SC16IS7XX_H_
#define _SC16IS7XX_H_
-#include <linux/mod_devicetable.h>
+#include <linux/device-id/of.h>
#include <linux/regmap.h>
#include <linux/types.h>
--
2.47.3