mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
xen/dts: Prefix device tree macro by dt_
There is 2 macros: for_each_device_node and for_each_property_of_node with a too generic name. Also replace all call-site with the new function names. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
9fe65ea739
commit
dff2cc6324
2 files changed
+7
-7
No files matched your search
@@ -624,7 +624,7 @@ struct dt_device_node *dt_find_node_by_name(struct dt_device_node *from,
|
||||
struct dt_device_node *dt;
|
||||
|
||||
dt = from ? from->allnext : dt_host;
|
||||
for_each_device_node(dt, np)
|
||||
dt_for_each_device_node(dt, np)
|
||||
if ( np->name && (dt_node_cmp(np->name, name) == 0) )
|
||||
break;
|
||||
|
||||
@@ -635,7 +635,7 @@ struct dt_device_node *dt_find_node_by_path(const char *path)
|
||||
{
|
||||
struct dt_device_node *np;
|
||||
|
||||
for_each_device_node(dt_host, np)
|
||||
dt_for_each_device_node(dt_host, np)
|
||||
if ( np->full_name && (dt_node_cmp(np->full_name, path) == 0) )
|
||||
break;
|
||||
|
||||
@@ -672,7 +672,7 @@ dt_find_compatible_node(struct dt_device_node *from,
|
||||
struct dt_device_node *dt;
|
||||
|
||||
dt = from ? from->allnext : dt_host;
|
||||
for_each_device_node(dt, np)
|
||||
dt_for_each_device_node(dt, np)
|
||||
{
|
||||
if ( type
|
||||
&& !(np->type && (dt_node_cmp(np->type, type) == 0)) )
|
||||
@@ -1009,7 +1009,7 @@ static const struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle)
|
||||
{
|
||||
const struct dt_device_node *np;
|
||||
|
||||
for_each_device_node(dt_host, np)
|
||||
dt_for_each_device_node(dt_host, np)
|
||||
if ( np->phandle == handle )
|
||||
break;
|
||||
|
||||
@@ -1679,7 +1679,7 @@ static void __init dt_alias_scan(void)
|
||||
if ( !aliases )
|
||||
return;
|
||||
|
||||
for_each_property_of_node( aliases, pp )
|
||||
dt_for_each_property_node( aliases, pp )
|
||||
{
|
||||
const char *start = pp->name;
|
||||
const char *end = start + strlen(start);
|
||||
|
||||
@@ -236,10 +236,10 @@ struct dt_device_node * __init dt_find_interrupt_controller(const char *compat);
|
||||
#define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 2
|
||||
#define DT_ROOT_NODE_SIZE_CELLS_DEFAULT 1
|
||||
|
||||
#define for_each_property_of_node(dn, pp) \
|
||||
#define dt_for_each_property_node(dn, pp) \
|
||||
for ( pp = dn->properties; pp != NULL; pp = pp->next )
|
||||
|
||||
#define for_each_device_node(dt, dn) \
|
||||
#define dt_for_each_device_node(dt, dn) \
|
||||
for ( dn = dt; dn != NULL; dn = dn->allnext )
|
||||
|
||||
/* Helper to read a big number; size is in cells (not bytes) */
|
||||
|
||||