dm: core: Require users of devres to include the header
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 35dc234..c84d75a 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -13,6 +13,7 @@
#include <i2c.h>
#include <asm/io.h>
#include <asm/arch/scu_ast2500.h>
+#include <linux/err.h>
#include "ast_i2c.h"
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index c8c5d2c..ae9cf16 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -12,6 +12,7 @@
#include <reset.h>
#include <asm/io.h>
#include "designware_i2c.h"
+#include <linux/err.h>
#ifdef CONFIG_SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED
static int dw_i2c_enable(struct i2c_regs *i2c_base, bool enable)
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index ee59bac..bcf4516 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/err.h>
#define I2C_TIMEOUT_MS 100
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index e8b124f..29e283c 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -11,6 +11,7 @@
#include <asm-generic/gpio.h>
#include <common.h>
#include <dm.h>
+#include <dm/devres.h>
#include <dm/pinctrl.h>
#include <fdtdec.h>
#include <i2c.h>
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 4be41dd..f37db31 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -18,6 +18,7 @@
#endif
#include <asm/arch/gpio.h>
#include <asm/arch-tegra/tegra_i2c.h>
+#include <linux/err.h>
enum i2c_type {
TYPE_114,