All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons
@ 2018-12-05 19:50 Rob Herring
  2018-12-05 20:14 ` Pavel Machek
  2018-12-06 21:00 ` Jacek Anaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2018-12-05 19:50 UTC (permalink / raw)
  To: devicetree, linux-kernel; +Cc: Jacek Anaszewski, Pavel Machek, linux-leds

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: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/leds/leds-88pm860x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c
index 77a104d2b124..036d4a536697 100644
--- a/drivers/leds/leds-88pm860x.c
+++ b/drivers/leds/leds-88pm860x.c
@@ -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);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons
  2018-12-05 19:50 [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons Rob Herring
@ 2018-12-05 20:14 ` Pavel Machek
  2018-12-06 21:00 ` Jacek Anaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2018-12-05 20:14 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, Jacek Anaszewski, linux-leds

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

On Wed 2018-12-05 13:50:27, Rob Herring wrote:
> 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: Jacek Anaszewski <jacek.anaszewski@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons
  2018-12-05 19:50 [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons Rob Herring
  2018-12-05 20:14 ` Pavel Machek
@ 2018-12-06 21:00 ` Jacek Anaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Jacek Anaszewski @ 2018-12-06 21:00 UTC (permalink / raw)
  To: Rob Herring, devicetree, linux-kernel; +Cc: Pavel Machek, linux-leds

Hi Rob,

Thank you for the patch.

On 12/5/18 2:50 PM, Rob Herring wrote:
> 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: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: linux-leds@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>   drivers/leds/leds-88pm860x.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c
> index 77a104d2b124..036d4a536697 100644
> --- a/drivers/leds/leds-88pm860x.c
> +++ b/drivers/leds/leds-88pm860x.c
> @@ -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.

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-06 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 19:50 [PATCH] leds: 88pm860x: Use of_node_name_eq for node name comparisons Rob Herring
2018-12-05 20:14 ` Pavel Machek
2018-12-06 21:00 ` Jacek Anaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.