Skip to content

Commit e80fc4b

Browse files
andy-shevlag-linaro
authored andcommitted
leds: gpio: Keep driver firmware interface agnostic
The of.h is used as a proxy to mod_devicetable, replace former by latter. The commit 2d61801 ("leds: gpio: Configure per-LED pin control") added yet another unneeded OF APIs. Replace with direct use of fwnode. Altogether this makes driver agnostic to the firmware interface in use. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 49e50aa commit e80fc4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/leds/leds-gpio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <linux/gpio/consumer.h>
1212
#include <linux/kernel.h>
1313
#include <linux/leds.h>
14+
#include <linux/mod_devicetable.h>
1415
#include <linux/module.h>
15-
#include <linux/of.h>
1616
#include <linux/pinctrl/consumer.h>
1717
#include <linux/platform_device.h>
1818
#include <linux/property.h>
@@ -129,8 +129,8 @@ static int create_gpio_led(const struct gpio_led *template,
129129
ret = PTR_ERR(pinctrl);
130130
if (ret != -ENODEV) {
131131
dev_warn(led_dat->cdev.dev,
132-
"Failed to select %pOF pinctrl: %d\n",
133-
to_of_node(fwnode), ret);
132+
"Failed to select %pfw pinctrl: %d\n",
133+
fwnode, ret);
134134
} else {
135135
/* pinctrl-%d not present, not an error */
136136
ret = 0;

0 commit comments

Comments
 (0)