mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] usb: dfu: Fix spelling of flag name
@ 2014-02-26 14:35 Sascha Hauer
  2014-02-26 14:35 ` [PATCH 2/3] usb: dfu: Add create flag Sascha Hauer
  2014-02-26 14:35 ` [PATCH 3/3] defaultenv: Add boot option for DFU Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2014-02-26 14:35 UTC (permalink / raw)
  To: barebox

DFU_FLAG_SAVE should really be named DFU_FLAG_SAFE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/dfu.c           | 2 +-
 drivers/usb/gadget/dfu.c | 4 ++--
 include/usb/dfu.h        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/commands/dfu.c b/commands/dfu.c
index ec1197a..b310585 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -60,7 +60,7 @@ static int dfu_do_parse_one(char *partstr, char **endstr, struct usb_dfu_dev *df
 		case PARSE_FLAGS:
 			switch (*partstr) {
 			case 's':
-				dfu->flags |= DFU_FLAG_SAVE;
+				dfu->flags |= DFU_FLAG_SAFE;
 				break;
 			case 'r':
 				dfu->flags |= DFU_FLAG_READBACK;
diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
index e15fc41..6002ff0 100644
--- a/drivers/usb/gadget/dfu.c
+++ b/drivers/usb/gadget/dfu.c
@@ -244,7 +244,7 @@ static int handle_dnload(struct usb_function *f, const struct usb_ctrlrequest *c
 
 	if (w_length == 0) {
 		dfu->dfu_state = DFU_STATE_dfuIDLE;
-		if (dfu_devs[dfualt].flags & DFU_FLAG_SAVE) {
+		if (dfu_devs[dfualt].flags & DFU_FLAG_SAFE) {
 			int fd;
 
 			fd = open(dfu_devs[dfualt].dev, O_WRONLY);
@@ -376,7 +376,7 @@ static int dfu_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
 				goto out;
 			}
 			debug("dfu: starting download to %s\n", dfu_devs[dfualt].dev);
-			if (dfu_devs[dfualt].flags & DFU_FLAG_SAVE)
+			if (dfu_devs[dfualt].flags & DFU_FLAG_SAFE)
 				dfufd = open(DFU_TEMPFILE, O_WRONLY | O_CREAT);
 			else
 				dfufd = open(dfu_devs[dfualt].dev, O_WRONLY);
diff --git a/include/usb/dfu.h b/include/usb/dfu.h
index 698ba9d..00031e7 100644
--- a/include/usb/dfu.h
+++ b/include/usb/dfu.h
@@ -22,7 +22,7 @@
 
 #include <linux/types.h>
 
-#define DFU_FLAG_SAVE		(1 << 0)
+#define DFU_FLAG_SAFE		(1 << 0)
 #define DFU_FLAG_READBACK	(1 << 1)
 
 struct usb_dfu_dev {
-- 
1.8.5.3


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-26 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-26 14:35 [PATCH 1/3] usb: dfu: Fix spelling of flag name Sascha Hauer
2014-02-26 14:35 ` [PATCH 2/3] usb: dfu: Add create flag Sascha Hauer
2014-02-26 14:35 ` [PATCH 3/3] defaultenv: Add boot option for DFU Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox