[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/dt: add match for non-available nodes
commit aacb92ad5a0b18840f89667b9e5bdab047b35b0e Author: Andrii Anisov <andrii.anisov@xxxxxxxxxxxxxxx> AuthorDate: Thu Jul 3 12:55:26 2014 +0300 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Jul 3 13:55:32 2014 +0100 xen/dt: add match for non-available nodes Signed-off-by: Andrii Anisov <andrii.anisov@xxxxxxxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/common/device_tree.c | 6 +++++- xen/include/xen/device_tree.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index f0b17a3..310635e 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -680,7 +680,8 @@ bool_t dt_match_node(const struct dt_device_match *matches, if ( !matches ) return 0; - while ( matches->path || matches->type || matches->compatible ) + while ( matches->path || matches->type || + matches->compatible || matches->not_available ) { bool_t match = 1; @@ -693,6 +694,9 @@ bool_t dt_match_node(const struct dt_device_match *matches, if ( matches->compatible ) match &= dt_device_is_compatible(node, matches->compatible); + if ( matches->not_available ) + match &= !dt_device_is_available(node); + if ( match ) return match; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 25db076..865e1ef 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -65,11 +65,13 @@ struct dt_device_match { const char *path; const char *type; const char *compatible; + const bool_t not_available; }; #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 } typedef u32 dt_phandle; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |