]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/device-tree: Add __DT_MATCH macros without braces
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Fri, 23 Sep 2016 18:53:19 +0000 (20:53 +0200)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:27:30 +0000 (18:27 -0700)
Add __DT_MATCH macros without braces to allow the creation
of match descriptors with multiple combined match options.

Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
xen/include/xen/device_tree.h

index 3657ac20cd05b8dac2a830640bb989fa4cd1365a..da153a55608e67d9aca030c995ccc92d2af02328 100644 (file)
@@ -32,10 +32,15 @@ struct dt_device_match {
     const void *data;
 };
 
-#define DT_MATCH_PATH(p)                { .path = p }
-#define DT_MATCH_TYPE(typ)              { .type = typ }
-#define DT_MATCH_COMPATIBLE(compat)     { .compatible = compat }
-#define DT_MATCH_NOT_AVAILABLE()        { .not_available = 1 }
+#define __DT_MATCH_PATH(p)              .path = p
+#define __DT_MATCH_TYPE(typ)            .type = typ
+#define __DT_MATCH_COMPATIBLE(compat)   .compatible = compat
+#define __DT_MATCH_NOT_AVAILABLE()      .not_available = 1
+
+#define DT_MATCH_PATH(p)                { __DT_MATCH_PATH(p) }
+#define DT_MATCH_TYPE(typ)              { __DT_MATCH_TYPE(typ) }
+#define DT_MATCH_COMPATIBLE(compat)     { __DT_MATCH_COMPATIBLE(compat) }
+#define DT_MATCH_NOT_AVAILABLE()        { __DT_MATCH_NOT_AVAILABLE() }
 
 typedef u32 dt_phandle;