usb: Make compiling gadget support optional
There is no need to compile and include this code if it is not used.
CONFIG_USB_GADGET can be used for the purpose.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
diff --git a/Makefile b/Makefile
index eeb299f..158355f 100644
--- a/Makefile
+++ b/Makefile
@@ -712,8 +712,8 @@
libs-y += drivers/usb/common/
libs-y += drivers/usb/emul/
libs-y += drivers/usb/eth/
-libs-y += drivers/usb/gadget/
-libs-y += drivers/usb/gadget/udc/
+libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/
+libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/
libs-y += drivers/usb/host/
libs-y += drivers/usb/musb/
libs-y += drivers/usb/musb-new/