diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-08-07 16:23:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-08-08 09:31:41 +0200 |
commit | 383ba5137a2ea4c2c9d5230bd51384aec187166d (patch) | |
tree | f35c31bd3481ba24f9e8ddb93af7bc73f62054d8 | |
parent | 6d1b29be91570b2407b7e072260a4990073de9a7 (diff) | |
download | barebox-383ba5137a2ea4c2c9d5230bd51384aec187166d.tar.gz barebox-383ba5137a2ea4c2c9d5230bd51384aec187166d.tar.xz |
usb: gadget: allow to actually enable sparse fastboot support
When sparse support was (intended to be) made optional it was
effectively unconditionally disabled because
IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE)
always evaluates to 0. To actually make use of the introduced kconfig
symbol the CONFIG_ prefix must not be skipped.
Fixes: f4b5d3eeb607 ("usb: gadget: fastboot: Make sparse support optional")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Gavin Schenk <g.schenk@eckelmann.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 7ccf227714..40a78987e4 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -337,7 +337,7 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f) fb_setvar(var, "0.4"); var = fb_addvar(f_fb, "bootloader-version"); fb_setvar(var, release_string); - if (IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE)) { + if (IS_ENABLED(CONFIG_USB_GADGET_FASTBOOT_SPARSE)) { var = fb_addvar(f_fb, "max-download-size"); fb_setvar(var, "%u", fastboot_max_download_size); } @@ -947,7 +947,7 @@ static void cb_flash(struct f_fastboot *f_fb, const char *cmd) filename = fentry->filename; if (filetype == filetype_android_sparse) { - if (!IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE)) { + if (!IS_ENABLED(CONFIG_USB_GADGET_FASTBOOT_SPARSE)) { fastboot_tx_print(f_fb, "FAILsparse image not supported"); ret = -EOPNOTSUPP; goto out; @@ -1233,7 +1233,7 @@ done: static int fastboot_globalvars_init(void) { - if (IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE)) + if (IS_ENABLED(CONFIG_USB_GADGET_FASTBOOT_SPARSE)) globalvar_add_simple_int("usbgadget.fastboot_max_download_size", &fastboot_max_download_size, "%u"); |