mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
69d6cbe748
commit
a6921adcf2
3 changed files with 10 additions and 4 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Reference in a new issue