Skip to content

Commit

Permalink
fs/openpromfs: Use of_node_name_eq for node name comparisons
Browse files Browse the repository at this point in the history
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
robherring authored and davem330 committed Nov 18, 2018
1 parent 105e996 commit f3180e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/openpromfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry
set_nlink(inode, 2);
break;
case op_inode_prop:
if (!strcmp(dp->name, "options") && (len == 17) &&
if (of_node_name_eq(dp, "options") && (len == 17) &&
!strncmp (name, "security-password", 17))
inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR;
else
Expand Down

0 comments on commit f3180e1

Please sign in to comment.