summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-10-16 18:10:00 +0200
committerLee Jones <lee@kernel.org>2023-11-01 12:29:19 +0100
commite80fc4bfc820aa44c500cf4c61e08765f36d3c63 (patch)
tree72ea247b2955d757d247e316b9fa095d1a924034 /drivers/leds
parentleds: core: Refactor led_update_brightness() to use standard pattern (diff)
downloadlinux-e80fc4bfc820aa44c500cf4c61e08765f36d3c63.tar.xz
linux-e80fc4bfc820aa44c500cf4c61e08765f36d3c63.zip
leds: gpio: Keep driver firmware interface agnostic
The of.h is used as a proxy to mod_devicetable, replace former by latter. The commit 2d6180147e92 ("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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231016161005.1471768-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index a6597f0f3eb4..debadb48ceda 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -11,8 +11,8 @@
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/leds.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/property.h>
@@ -129,8 +129,8 @@ static int create_gpio_led(const struct gpio_led *template,
ret = PTR_ERR(pinctrl);
if (ret != -ENODEV) {
dev_warn(led_dat->cdev.dev,
- "Failed to select %pOF pinctrl: %d\n",
- to_of_node(fwnode), ret);
+ "Failed to select %pfw pinctrl: %d\n",
+ fwnode, ret);
} else {
/* pinctrl-%d not present, not an error */
ret = 0;