summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-01-24 23:27:48 +0900
committerTom Rini <trini@konsulko.com>2016-01-25 10:39:59 -0500
commit84b8bf6d5d2a52fb40124c881de162b094ff5cc1 (patch)
tree92f41f93188419298d31121a58a085d113190ef7 /drivers/usb
parentbe6b2b31708a4a87425a81811323191b67947e56 (diff)
downloadtalos-obmc-uboot-84b8bf6d5d2a52fb40124c881de162b094ff5cc1.tar.gz
talos-obmc-uboot-84b8bf6d5d2a52fb40124c881de162b094ff5cc1.zip
bug.h: move BUILD_BUG_* defines to include/linux/bug.h
BUILD_BUG_* macros have been defined in several headers. It would be nice to collect them in include/linux/bug.h like Linux. This commit is cherry-picking useful macros from include/linux/bug.h of Linux 4.4. I did not import BUILD_BUG_ON_MSG() because it would not work if it is used with include/common.h in U-Boot. I'd like to postpone it until the root cause (the "error()" macro in include/common.h causes the name conflict with "__attribute__((error()))") is fixed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/gadget.c1
-rw-r--r--drivers/usb/dwc3/linux-compat.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8ff949d241..25ccc01d1b 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -18,6 +18,7 @@
#include <malloc.h>
#include <asm/dma-mapping.h>
#include <usb/lin_gadget_compat.h>
+#include <linux/bug.h>
#include <linux/list.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/dwc3/linux-compat.h b/drivers/usb/dwc3/linux-compat.h
index 6c9c2791a8..9e944a31be 100644
--- a/drivers/usb/dwc3/linux-compat.h
+++ b/drivers/usb/dwc3/linux-compat.h
@@ -17,8 +17,6 @@
#define dev_WARN(dev, format, arg...) debug(format, ##arg)
#define WARN_ON_ONCE(val) debug("Error %d\n", val)
-#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
-
static inline size_t strlcat(char *dest, const char *src, size_t n)
{
strcat(dest, src);
OpenPOWER on IntegriCloud