From patchwork Sun Jan 12 19:06:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 239520 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 12 Jan 2020 12:06:22 -0700 Subject: [PATCH 31/33] dm: core: Drop the inclusion of linux/compat.h in dm.h In-Reply-To: <20200112190624.79077-1-sjg@chromium.org> References: <20200112190624.79077-1-sjg@chromium.org> Message-ID: <20200112120216.31.I0e9c76aef442b3fe2efe37efba81c9398573305d@changeid> Most files don't need this header and it pulls in quite of lots of stuff, malloc() in particular. Drop it. Signed-off-by: Simon Glass --- board/hisilicon/poplar/poplar.c | 2 +- include/dm/device.h | 1 - include/linux/compat.h | 3 +++ include/phy.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 4926419a90..717e726b28 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -4,8 +4,8 @@ * Jorge Ramirez-Ortiz */ -#include #include +#include #include #include #include diff --git a/include/dm/device.h b/include/dm/device.h index 4c79832597..cb1cd27738 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/compat.h b/include/linux/compat.h index d0f51baab4..171188a76f 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -123,7 +123,10 @@ static inline void kmem_cache_destroy(struct kmem_cache *cachep) #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +/* This is also defined in ARMv8's mmu.h */ +#ifndef PAGE_SIZE #define PAGE_SIZE 4096 +#endif /* drivers/char/random.c */ #define get_random_bytes(...) diff --git a/include/phy.h b/include/phy.h index 6ace9b3a0c..42cfc59ec0 100644 --- a/include/phy.h +++ b/include/phy.h @@ -10,6 +10,7 @@ #define _PHY_H #include +#include #include #include #include