Skip to contentSkip to conversation

leds: gpio: Drop unneeded manual of_node assignment

PATCH Applied Krzysztof Kozlowski 3 participants 3 messages Dec 7, 2018 – Dec 8, 2018 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: gpio: Drop unneeded manual of_node assignment

This reverts the main change of commit bff23714bc36 ("leds: leds-gpio:
Set of_node for created LED devices") because of_node assignment is handled by core since commit 7ea79ae86c28 ("leds: gpio: use OF variant of LED registering function"). Basically the code was overwriting the of_node with same value.

No functional change expected.

---
 drivers/leds/leds-gpio.c | 1 -
 1 file changed, 1 deletion(-)
drivers/leds/leds-gpio.c +0 -1
index 45e012093865..998f2ff6914d 100644
@@ -190,7 +190,6 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
 			fwnode_handle_put(child);
 			return ERR_PTR(ret);
 		}
-		led_dat->cdev.dev->of_node = np;
 		priv->num_leds++;
 	}
 
Signature · 1 line
2.7.4
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Krzysztof Kozlowski

This reverts the main change of commit bff23714bc36 ("leds: leds-gpio:
Set of_node for created LED devices") because of_node assignment is handled by core since commit 7ea79ae86c28 ("leds: gpio: use OF variant of LED registering function"). Basically the code was overwriting the of_node with same value.

No functional change expected.

Thanks!

#2 lore raw
In reply to Krzysztof Kozlowski

Hi Krzysztof,

Thank you for the patch.

Quoted 19 lines · Krzysztof Kozlowski

This reverts the main change of commit bff23714bc36 ("leds: leds-gpio:
Set of_node for created LED devices") because of_node assignment is handled by core since commit 7ea79ae86c28 ("leds: gpio: use OF variant of LED registering function"). Basically the code was overwriting the of_node with same value.

No functional change expected.

---
  drivers/leds/leds-gpio.c | 1 -
  1 file changed, 1 deletion(-)
drivers/leds/leds-gpio.c +0 -0
index 45e012093865..998f2ff6914d 100644

drivers/leds/leds-gpio.c static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev) · line 195

Quoted 7 lines
drivers/leds/leds-gpio.c +0 -1
@@ -190,7 +190,6 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
  			fwnode_handle_put(child);
  			return ERR_PTR(ret);
  		}
-		led_dat->cdev.dev->of_node = np;
  		priv->num_leds++;
  	}
 

Applied.

Signature · 2 lines
Best regards,
Jacek Anaszewski