summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-22 11:25:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-26 09:24:53 +0200
commitb1374a6d97f1211f5c897641668371978eaa592e (patch)
tree582a666b7d7dd5d8f3e9c120e0584db097889138
parent8228f9e1fd0dc5a5dc7ffe5aacd94cb3310cb94b (diff)
downloadbarebox-b1374a6d97f1211f5c897641668371978eaa592e.tar.gz
usb: fastboot: drop CONFIG_COMMAND_SUPPORT dependency
fastboot can run without command support. In this case we cannot execute oem commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/usb/gadget/Kconfig1
-rw-r--r--drivers/usb/gadget/f_fastboot.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 13a3e70..81c3723 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -44,7 +44,6 @@ config USB_GADGET_SERIAL
config USB_GADGET_FASTBOOT
bool
select BANNER
- depends on COMMAND_SUPPORT
prompt "Android Fastboot support"
endif
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index b483d7f..c85830f 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -872,6 +872,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));