From 61b29b82683863a970fd4609a7c58512872616bc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:15 -0700 Subject: 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 Reviewed-by: Anatolij Gustschin --- drivers/clk/imx/clk-composite-8m.c | 2 ++ drivers/clk/imx/clk-gate2.c | 2 ++ drivers/clk/imx/clk-pfd.c | 2 ++ drivers/clk/imx/clk-pll14xx.c | 2 ++ drivers/clk/imx/clk-pllv3.c | 2 ++ 5 files changed, 10 insertions(+) (limited to 'drivers/clk/imx') diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c index 95120d6559..3e99c528de 100644 --- a/drivers/clk/imx/clk-composite-8m.c +++ b/drivers/clk/imx/clk-composite-8m.c @@ -8,9 +8,11 @@ #include #include #include +#include #include #include #include "clk.h" +#include #define UBOOT_DM_CLK_IMX_COMPOSITE "imx_clk_composite" diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c index 1b9db6e791..b38890d5ba 100644 --- a/drivers/clk/imx/clk-gate2.c +++ b/drivers/clk/imx/clk-gate2.c @@ -19,9 +19,11 @@ #include #include #include +#include #include #include #include "clk.h" +#include #define UBOOT_DM_CLK_IMX_GATE2 "imx_clk_gate2" diff --git a/drivers/clk/imx/clk-pfd.c b/drivers/clk/imx/clk-pfd.c index 4ae55f5a07..b8be3167c4 100644 --- a/drivers/clk/imx/clk-pfd.c +++ b/drivers/clk/imx/clk-pfd.c @@ -19,10 +19,12 @@ #include #include #include +#include #include #include #include #include "clk.h" +#include #define UBOOT_DM_CLK_IMX_PFD "imx_clk_pfd" diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index 2246beb21b..1673eb26b2 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -10,7 +10,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index 0cdb9df45d..525442debf 100644 --- a/drivers/clk/imx/clk-pllv3.c +++ b/drivers/clk/imx/clk-pllv3.c @@ -10,9 +10,11 @@ #include #include #include +#include #include #include #include "clk.h" +#include #define UBOOT_DM_CLK_IMX_PLLV3_GENERIC "imx_clk_pllv3_generic" #define UBOOT_DM_CLK_IMX_PLLV3_SYS "imx_clk_pllv3_sys" -- cgit From 336d4615f8fa774557d14f9b3245daa9e5fe3dbc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:16 -0700 Subject: dm: core: Create a new header file for 'compat' features At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass --- drivers/clk/imx/clk-imx8.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/clk/imx') diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c index a755e26501..671054d9be 100644 --- a/drivers/clk/imx/clk-imx8.c +++ b/drivers/clk/imx/clk-imx8.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include -- cgit