dm: core: Drop the inclusion of linux/compat.h in dm.h
authorSimon Glass <sjg@chromium.org>
Mon, 3 Feb 2020 14:36:17 +0000 (07:36 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Feb 2020 04:48:22 +0000 (21:48 -0700)
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 <sjg@chromium.org>
board/hisilicon/poplar/poplar.c
drivers/ram/imxrt_sdram.c
drivers/spi/nxp_fspi.c
include/dm/device.h
include/linux/compat.h
include/phy.h

index 36999bdcea78d7309a9b3fb62a22e18ad0e721cc..4937dc374c7877b4ae9d959804aae3a3c0a13539 100644 (file)
@@ -4,9 +4,9 @@
  * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
  */
 
+#include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
-#include <common.h>
 #include <init.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
index af7400be82a8efc8fcf10d3dc71a1aa0de10daea..ac15e94f008a98d7df861c403bae7154fe51bf7c 100644 (file)
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <linux/err.h>
 
 /* SDRAM Command Code */
 #define SD_CC_ARD              0x0     /* Master Bus (AXI) command - Read */
index a2fab7ad0a255bdc909a4fc994008315a2ac35d0..0e6c7be785afd0525bab31e5cbea2fbe1ba21060 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/sizes.h>
 #include <linux/iopoll.h>
 #include <linux/bug.h>
+#include <linux/err.h>
 
 /*
  * The driver only uses one single LUT entry, that is updated on
index 544da27e61f93857861ec7eca20554ad18f05f35..ab806d0b7e9ef16028303cfc43c073970a011ee1 100644 (file)
@@ -14,7 +14,6 @@
 #include <dm/uclass-id.h>
 #include <fdtdec.h>
 #include <linker_lists.h>
-#include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/printk.h>
index d0f51baab407b67d8c7010f8c325bc2d81fc792e..171188a76f0c1d670472050f060ff0947ca696f5 100644 (file)
@@ -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(...)
index 6ace9b3a0c4c7b21c4b6b6c8a9793f2be2ee1315..42cfc59ec0ab2ce472c8c2ee2eb23fd73a65f9d2 100644 (file)
@@ -10,6 +10,7 @@
 #define _PHY_H
 
 #include <dm.h>
+#include <linux/errno.h>
 #include <linux/list.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>