leds: 88pm860x: Use of_node_name_eq for node name comparisons
PATCH 1/1 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.
--- drivers/leds/leds-88pm860x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-88pm860x.c +1 -1
@@ -130,7 +130,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,return -ENODEV ; }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" , &iset); data->iset =PM8606_LED_CURRENT (iset);
Signature · 1 line
2.19.1
Quoted 8 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper 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 Jacek Anaszewski <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Jacek Anaszewski
AppliedHi Rob,
Thank you for the patch.
Quoted 21 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper 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 Jacek Anaszewski <[email protected]>Cc Pavel Machek <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/leds/leds-88pm860x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/leds/leds-88pm860x.c +0
-0
drivers/leds/leds-88pm860x.c static int pm860x_led_dt_init(struct platform_device *pdev, · line 136
Quoted 8 lines
drivers/leds/leds-88pm860x.c +1
-1@@ -130,7 +130,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,return -ENODEV ; }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" , &iset); data->iset =PM8606_LED_CURRENT (iset);
Applied.
Signature · 2 lines
Best regards, Jacek Anaszewski