[PATCH v2 08/17] of: Explicitly include <linux/types.h> and <linux/err.h>
From: Uwe Kleine-König (The Capable Hub)
Date: Fri Jun 26 2026 - 14:06:49 EST
<linux/of_platform.h> uses resource_size_t and relies on the transitive
include <linux/mod_devicetable.h> -> <linux/types.h>. It also uses error
constants and thus relying on the include chain
<linux/mod_devicetable.h> -> <linux/uuid.h> -> <linux/string.h> ->
<linux/err.h>.
With the plan to split <linux/mod_devicetable.h> per subsystem and then
only letting of_platform.h include the of-specific bits (which don't
require these two headers), add the needed includes explicitly to keep
the header self-contained.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
include/linux/of_platform.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 17471ef8e092..48f73af88dd7 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -6,6 +6,8 @@
* <benh@xxxxxxxxxxxxxxxxxxx>
*/
+#include <linux/types.h>
+#include <linux/err.h>
#include <linux/mod_devicetable.h>
struct device;
--
2.47.3