diff mbox series

[v1,1/6] leds: gpio: Keep driver firmware interface agnostic

Message ID 20231016161005.1471768-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/6] leds: gpio: Keep driver firmware interface agnostic | expand

Commit Message

Andy Shevchenko Oct. 16, 2023, 4:10 p.m. UTC
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(-)

Comments

Lee Jones Oct. 19, 2023, 12:26 p.m. UTC | #1
On Mon, 16 Oct 2023 19:10:00 +0300, Andy Shevchenko wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/6] leds: gpio: Keep driver firmware interface agnostic
      commit: 04262082e2c203e6834bf65c7a46e2eadf212c66
[2/6] leds: gpio: Utilise PTR_ERR_OR_ZERO()
      commit: 36d270892d4733439d3fd5b713ef07029aae1bf4
[3/6] leds: gpio: Refactor code to use devm_gpiod_get_index_optional()
      commit: 4c5f908c04fda867c8130087a628a1bccec3fb05
[4/6] leds: gpio: Move temporary variable for struct device to gpio_led_probe()
      commit: 087da384361247adeb894dcb38fbbec8d4d53790
[5/6] leds: gpio: Remove unneeded assignment
      commit: cdae3873bb328fbc690722b76b67f00213c92ade
[6/6] leds: gpio: Update headers
      commit: 1f313de42c4ff9b590f00d747bab25adc0cb011c

--
Lee Jones [李琼斯]
diff mbox series

Patch

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;