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 <dfu.h>).
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
__le16 wTransferSize;
__le16 bcdDFUVersion;
} __packed;
-
-/* configuration-specific linkup */
-int dfu_add(struct usb_configuration *c);
#endif /* __F_DFU_H_ */
#include <g_dnl.h>
#include <usb_mass_storage.h>
-#include "f_dfu.h"
+#include <dfu.h>
#include "gadget_chips.h"
#include "composite.c"
#include <common.h>
#include <linux/list.h>
#include <mmc.h>
+#include <linux/usb/composite.h>
enum dfu_device_type {
DFU_DEV_MMC = 1,
}
#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_ */