Commit a6921adc authored by Lukasz Majewski's avatar Lukasz Majewski Committed by Marek Vasut
Browse files

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 <dfu.h>).
Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
parent 69d6cbe7
......@@ -82,7 +82,4 @@ struct dfu_function_descriptor {
__le16 wTransferSize;
__le16 bcdDFUVersion;
} __packed;
/* configuration-specific linkup */
int dfu_add(struct usb_configuration *c);
#endif /* __F_DFU_H_ */
......@@ -15,7 +15,7 @@
#include <g_dnl.h>
#include <usb_mass_storage.h>
#include "f_dfu.h"
#include <dfu.h>
#include "gadget_chips.h"
#include "composite.c"
......
......@@ -14,6 +14,7 @@
#include <common.h>
#include <linux/list.h>
#include <mmc.h>
#include <linux/usb/composite.h>
enum dfu_device_type {
DFU_DEV_MMC = 1,
......@@ -161,4 +162,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_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment