summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/linux-compat.h
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2015-02-23 18:40:02 +0530
committerMarek Vasut <marex@denx.de>2015-04-14 05:48:09 +0200
commit71744d0d06fd078207c527f362fcc66c93228d36 (patch)
tree5bed7c48fc8308473d42dcc7133095a772b4c95a /drivers/usb/dwc3/linux-compat.h
parent6f80390691286074c7595a442cde1a87267aa2b1 (diff)
downloadu-boot-71744d0d06fd078207c527f362fcc66c93228d36.tar.gz
u-boot-71744d0d06fd078207c527f362fcc66c93228d36.tar.bz2
u-boot-71744d0d06fd078207c527f362fcc66c93228d36.zip
usb: dwc3: core: make dwc3 core build in uboot
*) Changed the include header files to that used in u-boot. *) Removed phy_* APIs *) Removed jiffies and used a simple while loop *) Used dma_alloc_coherent and dma_free_coherent APIs of u-boot *) Fixed other misc warnings Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/usb/dwc3/linux-compat.h')
-rw-r--r--drivers/usb/dwc3/linux-compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/linux-compat.h b/drivers/usb/dwc3/linux-compat.h
index cbfb946ad3..b36f68fec8 100644
--- a/drivers/usb/dwc3/linux-compat.h
+++ b/drivers/usb/dwc3/linux-compat.h
@@ -25,4 +25,14 @@ static inline size_t strlcat(char *dest, const char *src, size_t n)
return strlen(dest) + strlen(src);
}
+static inline void *devm_kzalloc(struct device *dev, unsigned int size,
+ unsigned int flags)
+{
+ return kzalloc(size, flags);
+}
+
+static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)
+{
+ return kzalloc(n * size, flags);
+}
#endif