mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] usb: gadget: allow to actually enable sparse fastboot support
Date: Tue,  7 Aug 2018 16:17:07 +0200	[thread overview]
Message-ID: <20180807141707.25909-1-u.kleine-koenig@pengutronix.de> (raw)

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>
---
 drivers/usb/gadget/f_fastboot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 7ccf22771493..df9f2a20f325 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;
-- 
2.18.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2018-08-07 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 14:17 Uwe Kleine-König [this message]
2018-08-07 14:23 ` [PATCH v2] " Uwe Kleine-König
2018-08-07 14:59   ` Schenk, Gavin
2018-08-08  7:32   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180807141707.25909-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox