Commit 555fc5ba authored by Rob Herring's avatar Rob Herring Committed by Jacek Anaszewski

leds: 88pm860x: 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.

For instances using of_node_cmp, this has the side effect of now using
case sensitive comparisons. This should not matter for any FDT based
system which this is.

Cc: linux-leds@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent e41ca3b1
...@@ -130,7 +130,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev, ...@@ -130,7 +130,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
return -ENODEV; return -ENODEV;
} }
for_each_child_of_node(nproot, np) { for_each_child_of_node(nproot, np) {
if (!of_node_cmp(np->name, data->name)) { if (of_node_name_eq(np, data->name)) {
of_property_read_u32(np, "marvell,88pm860x-iset", of_property_read_u32(np, "marvell,88pm860x-iset",
&iset); &iset);
data->iset = PM8606_LED_CURRENT(iset); data->iset = PM8606_LED_CURRENT(iset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment