diff options
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/devres.h | 8 | ||||
-rw-r--r-- | include/dm/of.h | 1 | ||||
-rw-r--r-- | include/dm/test.h | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/include/dm/devres.h b/include/dm/devres.h index 697534aa5be..27761deb6d1 100644 --- a/include/dm/devres.h +++ b/include/dm/devres.h @@ -266,17 +266,13 @@ static inline void *devm_kzalloc(struct udevice *dev, size_t size, gfp_t gfp) static inline void *devm_kmalloc_array(struct udevice *dev, size_t n, size_t size, gfp_t flags) { - /* TODO: add kmalloc_array() to linux/compat.h */ - if (size != 0 && n > SIZE_MAX / size) - return NULL; - return kmalloc(n * size, flags); + return kmalloc_array(n, size, flags); } static inline void *devm_kcalloc(struct udevice *dev, size_t n, size_t size, gfp_t flags) { - /* TODO: add kcalloc() to linux/compat.h */ - return kmalloc(n * size, flags | __GFP_ZERO); + return kcalloc(n, size, flags); } static inline void devm_kfree(struct udevice *dev, void *ptr) diff --git a/include/dm/of.h b/include/dm/of.h index b1c934f610d..b7404c139d1 100644 --- a/include/dm/of.h +++ b/include/dm/of.h @@ -7,7 +7,6 @@ #ifndef _DM_OF_H #define _DM_OF_H -#include <asm/u-boot.h> #include <asm/global_data.h> /* integer value within a device tree property which references another node */ diff --git a/include/dm/test.h b/include/dm/test.h index b5937509212..02737411a16 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -6,6 +6,8 @@ #ifndef __DM_TEST_H #define __DM_TEST_H +#include <linux/types.h> + struct udevice; /** |