aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass2022-09-06 20:27:04 -0600
committerTom Rini2022-09-29 16:07:58 -0400
commit98306987659769607642474954b2bf9555808542 (patch)
tree779abc4e47dd80c57d93b3538fa3a79f7fbba997 /drivers/core
parentc3a194dec97be3ceb74ba2c980e635aee1644d94 (diff)
dm: core: Drop the const from ofnode
Now that we support writing to ofnodes, the const is not accurate. Drop it to avoid undesirable casting. Also drop the ofnode_to_npw() which is now the same as ofnode_to_np(). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/ofnode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 8683e03c330..caf28c68c4a 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -268,7 +268,7 @@ ofnode ofnode_find_subnode(ofnode node, const char *subnode_name)
debug("%s: %s: ", __func__, subnode_name);
if (ofnode_is_np(node)) {
- const struct device_node *np = ofnode_to_np(node);
+ struct device_node *np = ofnode_to_np(node);
for (np = np->child; np; np = np->sibling) {
if (!strcmp(subnode_name, np->name))
@@ -1171,7 +1171,7 @@ int ofnode_write_prop(ofnode node, const char *propname, const void *value,
int len)
{
if (of_live_active())
- return of_write_prop(ofnode_to_npw(node), propname, len, value);
+ return of_write_prop(ofnode_to_np(node), propname, len, value);
else
return fdt_setprop((void *)gd->fdt_blob, ofnode_to_offset(node),
propname, value, len);