From: Edgar E. Iglesias Date: Fri, 23 Sep 2016 18:53:19 +0000 (+0200) Subject: xen/device-tree: Add __DT_MATCH macros without braces X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~315 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ca1a2e956f6bf575ca28262f572714eb90333614;p=xen.git xen/device-tree: Add __DT_MATCH macros without braces Add __DT_MATCH macros without braces to allow the creation of match descriptors with multiple combined match options. Acked-by: Julien Grall Signed-off-by: Edgar E. Iglesias --- diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 3657ac20cd..da153a5560 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -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;