public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/6] leds: gpio: Keep driver firmware interface agnostic
@ 2023-10-16 16:10 Andy Shevchenko
  2023-10-16 16:10 ` [PATCH v1 2/6] leds: gpio: Utilise PTR_ERR_OR_ZERO() Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Andy Shevchenko @ 2023-10-16 16:10 UTC (permalink / raw)
  To: Andy Shevchenko, linux-leds, linux-kernel; +Cc: Pavel Machek, Lee Jones

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>
---
 drivers/leds/leds-gpio.c | 6 +++---
 1 file 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;
-- 
2.40.0.1.gaa8946217a0b


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

end of thread, other threads:[~2023-10-19 12:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 16:10 [PATCH v1 1/6] leds: gpio: Keep driver firmware interface agnostic Andy Shevchenko
2023-10-16 16:10 ` [PATCH v1 2/6] leds: gpio: Utilise PTR_ERR_OR_ZERO() Andy Shevchenko
2023-10-16 16:10 ` [PATCH v1 3/6] leds: gpio: Refactor code to use devm_gpiod_get_index_optional() Andy Shevchenko
2023-10-16 16:10 ` [PATCH v1 4/6] leds: gpio: Move temporary variable for struct device to gpio_led_probe() Andy Shevchenko
2023-10-16 16:10 ` [PATCH v1 5/6] leds: gpio: Remove unneeded assignment Andy Shevchenko
2023-10-16 16:10 ` [PATCH v1 6/6] leds: gpio: Update headers Andy Shevchenko
2023-10-19 12:26 ` [PATCH v1 1/6] leds: gpio: Keep driver firmware interface agnostic Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox