[PATCH 5/5] usb: fastboot: drop CONFIG_COMMAND_SUPPORT dependency
Sascha Hauer
s.hauer at pengutronix.de
Mon Apr 25 04:30:44 PDT 2016
fastboot can run without command support. In this case we cannot
execute oem commands.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/usb/gadget/Kconfig | 1 +
drivers/usb/gadget/f_fastboot.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 13a3e70..fefe2dd 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -45,6 +45,7 @@ config USB_GADGET_FASTBOOT
bool
select BANNER
depends on COMMAND_SUPPORT
+ select BOSCH_COMMON
prompt "Android Fastboot support"
endif
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 1f56975..e83fa30 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -867,6 +867,11 @@ static void cb_oem_exec(struct usb_ep *ep, struct usb_request *req, const char *
struct f_fastboot *f_fb = req->context;
int ret;
+ if (!IS_ENABLED(CONFIG_COMMAND)) {
+ fastboot_tx_print(f_fb, "FAILno command support available");
+ return;
+ }
+
ret = run_command(cmd);
if (ret < 0)
fastboot_tx_print(f_fb, "FAIL%s", strerror(-ret));
--
2.8.0.rc3
More information about the barebox
mailing list