diff options
author | Rob Herring <robh@kernel.org> | 2018-08-27 09:37:06 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-12-05 15:45:13 -0500 |
commit | b3e46d1a0590500335f0b95e669ad6d84b12b03a (patch) | |
tree | 03ae42679eab36e311870dffdafe1aa7870875a2 /drivers/of/unittest.c | |
parent | ae517053f003bc3739640acd8d77617b14bf45d2 (diff) |
of: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 9a10a48eb6a1..84427384654d 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c | |||
@@ -2393,7 +2393,7 @@ static __init void of_unittest_overlay_high_level(void) | |||
2393 | */ | 2393 | */ |
2394 | pprev = &overlay_base_root->child; | 2394 | pprev = &overlay_base_root->child; |
2395 | for (np = overlay_base_root->child; np; np = np->sibling) { | 2395 | for (np = overlay_base_root->child; np; np = np->sibling) { |
2396 | if (!of_node_cmp(np->name, "__local_fixups__")) { | 2396 | if (of_node_name_eq(np, "__local_fixups__")) { |
2397 | *pprev = np->sibling; | 2397 | *pprev = np->sibling; |
2398 | break; | 2398 | break; |
2399 | } | 2399 | } |
@@ -2406,7 +2406,7 @@ static __init void of_unittest_overlay_high_level(void) | |||
2406 | /* will have to graft properties from node into live tree */ | 2406 | /* will have to graft properties from node into live tree */ |
2407 | pprev = &overlay_base_root->child; | 2407 | pprev = &overlay_base_root->child; |
2408 | for (np = overlay_base_root->child; np; np = np->sibling) { | 2408 | for (np = overlay_base_root->child; np; np = np->sibling) { |
2409 | if (!of_node_cmp(np->name, "__symbols__")) { | 2409 | if (of_node_name_eq(np, "__symbols__")) { |
2410 | overlay_base_symbols = np; | 2410 | overlay_base_symbols = np; |
2411 | *pprev = np->sibling; | 2411 | *pprev = np->sibling; |
2412 | break; | 2412 | break; |