From: Lukasz Majewski Date: Tue, 17 Sep 2013 13:58:23 +0000 (+0200) Subject: usb:g_dnl:dfu: Download gadget and DFU function code clean up X-Git-Tag: submit/tizen/20160318.071304~347 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05352f3d2caa8dc0c35f9704aa0b822dea37a67f;p=profile%2Fcommon%2Fplatform%2Fkernel%2Fu-boot-artik.git usb:g_dnl:dfu: Download gadget and DFU function code clean up The download gadget code and DFU function lacks of proper declarations for the case when a target board wants to use only one of available usb functions. Moreover the relevant declarations have been moved to consistent localization (like ). Signed-off-by: Lukasz Majewski Cc: Marek Vasut --- diff --git a/drivers/usb/gadget/f_dfu.h b/drivers/usb/gadget/f_dfu.h index 023e1adac..bc457f4de 100644 --- a/drivers/usb/gadget/f_dfu.h +++ b/drivers/usb/gadget/f_dfu.h @@ -94,7 +94,4 @@ struct dfu_function_descriptor { __le16 wTransferSize; __le16 bcdDFUVersion; } __packed; - -/* configuration-specific linkup */ -int dfu_add(struct usb_configuration *c); #endif /* __F_DFU_H_ */ diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 65e616626..9d4bca873 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -27,7 +27,7 @@ #include #include -#include "f_dfu.h" +#include #include "gadget_chips.h" #include "composite.c" diff --git a/include/dfu.h b/include/dfu.h index 0fc4007c1..edc791eff 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -26,6 +26,7 @@ #include #include #include +#include enum dfu_device_type { DFU_DEV_MMC = 1, @@ -173,4 +174,12 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *s) } #endif +#ifdef CONFIG_DFU_FUNCTION +int dfu_add(struct usb_configuration *c); +#else +int dfu_add(struct usb_configuration *c) +{ + return 0; +} +#endif #endif /* __DFU_ENTITY_H_ */