[PATCH 1/4] bbu: reserve upper 16 bits for handler specific flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let the handler store 16 bit of handler specific flags in
the generic handler struct. The setup functions of some
bbu handlers let the user specify a flags field. With this
change they can now pass generic and handler specific flags
in a single variable without having to use a second parameter.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 include/bbu.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/bbu.h b/include/bbu.h
index def568e498..d1ab9f5638 100644
--- a/include/bbu.h
+++ b/include/bbu.h
@@ -25,6 +25,10 @@ struct bbu_handler {
 	struct list_head list;
 #define BBU_HANDLER_FLAG_DEFAULT	(1 << 0)
 #define BBU_HANDLER_CAN_REFRESH		(1 << 1)
+	/*
+	 * The lower 16bit are generic flags, the upper 16bit are reserved
+	 * for handler specific flags.
+	 */
 	unsigned long flags;
 
 	/* default device file, can be overwritten on the command line */
-- 
2.17.1


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux