diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2013-09-17 15:58:21 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-09-24 17:51:35 +0200 |
commit | ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f (patch) | |
tree | 8097f878fba79928a25e821797e86a4d7a7fe846 /include | |
parent | e473b8b65b5c12a840e71939ed9fa243959ec5f2 (diff) | |
download | u-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.zip u-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.tar.gz u-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.tar.bz2 |
usb:g_dnl:ums: Conditional compilation for mass storage function (f_mass_storage)
The mass storage composite function is now compiled in only when
CONFIG_USB_GADGET_MASS_STORAGE is defined.
Such change provides binary size reduction for boards which use USB
download gadget (like am335x_evm) with DFU, but don't use UMS.
For example at am335x_evm board reduction is more than 2KiB for
text and around 120B for data.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_mass_storage.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h index 35cdcc3..e08deb4 100644 --- a/include/usb_mass_storage.h +++ b/include/usb_mass_storage.h @@ -11,6 +11,7 @@ #define SECTOR_SIZE 0x200 #include <mmc.h> +#include <linux/usb/composite.h> struct ums_device { struct mmc *mmc; @@ -39,4 +40,12 @@ extern struct ums_board_info *board_ums_init(unsigned int, extern int usb_gadget_handle_interrupts(void); extern int fsg_main_thread(void *); +#ifdef CONFIG_USB_GADGET_MASS_STORAGE +int fsg_add(struct usb_configuration *c); +#else +int fsg_add(struct usb_configuration *c) +{ + return 0; +} +#endif #endif /* __USB_MASS_STORAGE_H__ */ |