summaryrefslogtreecommitdiffstats
path: root/drivers/led
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-12-14 13:35:08 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-10 15:43:46 +0100
commite70b9d7a74698f1374244b2251216428db920aed (patch)
treeb8091531241075d04501751b5236ab54afbe48c2 /drivers/led
parent12763d0fe56899d3729d0e6755446ed7c740a88a (diff)
downloadbarebox-e70b9d7a74698f1374244b2251216428db920aed.tar.gz
barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.xz
Rename device_d::device_node to device_d::of_node
Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/led')
-rw-r--r--drivers/led/led-gpio.c4
-rw-r--r--drivers/led/led-pca955x.c2
-rw-r--r--drivers/led/led-pwm.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/led/led-gpio.c b/drivers/led/led-gpio.c
index 1a5eda0371..1458ca0bac 100644
--- a/drivers/led/led-gpio.c
+++ b/drivers/led/led-gpio.c
@@ -199,13 +199,13 @@ static int led_gpio_of_probe(struct device_d *dev)
int num_leds;
int ret = 0, n = 0;
- num_leds = of_get_child_count(dev->device_node);
+ num_leds = of_get_child_count(dev->of_node);
if (num_leds <= 0)
return num_leds;
leds = xzalloc(num_leds * sizeof(struct gpio_led));
- for_each_child_of_node(dev->device_node, child) {
+ for_each_child_of_node(dev->of_node, child) {
struct gpio_led *gled = &leds[n];
const char *default_state;
enum of_gpio_flags flags;
diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c
index aa518fe738..8eeef60fb1 100644
--- a/drivers/led/led-pca955x.c
+++ b/drivers/led/led-pca955x.c
@@ -365,7 +365,7 @@ static int led_pca955x_probe(struct device_d *dev)
pca955x->client = client;
pca955x->chipdef = chip;
- pdata = led_pca955x_pdata_of_init(dev->device_node, pca955x);
+ pdata = led_pca955x_pdata_of_init(dev->of_node, pca955x);
if (IS_ERR(pdata))
return PTR_ERR(pdata);
diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c
index 071e219d73..9dbf510dc6 100644
--- a/drivers/led/led-pwm.c
+++ b/drivers/led/led-pwm.c
@@ -44,7 +44,7 @@ static int led_pwm_of_probe(struct device_d *dev)
struct device_node *child;
int ret;
- for_each_child_of_node(dev->device_node, child) {
+ for_each_child_of_node(dev->of_node, child) {
struct pwmled *pwmled;
struct pwm_device *pwm;