public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v1 1/1] leds: Unexport of_led_get()
@ 2025-12-10 10:43 Jonathan Brophy
  2025-12-10 12:33 ` andriy.shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Brophy @ 2025-12-10 10:43 UTC (permalink / raw)
  To: andriy.shevchenko@linux.intel.com
  Cc: lee@kernel.org, linux-leds@vger.kernel.org, Pavel Machek,
	linux-kernel@vger.kernel.org

 [PATCH v1 1/1] leds: Unexport of_led_get()

it would seem the removal of this function has removed the only way to search led phandles the device tree.

The devm version works functionally different and is not a replacement.

virtual led grouping drivers are unable to match phandles.

is there plans to create a fwnode_led_get() replacment for of_led_get ?

The problem is gpio leds don't have fwnode properties so searching by platform does not work.

Reguards jonathan



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v1 1/1] leds: Unexport of_led_get()
@ 2025-06-30  9:26 Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2025-06-30  9:26 UTC (permalink / raw)
  To: Lee Jones, linux-leds, linux-kernel; +Cc: Pavel Machek, Andy Shevchenko

There are no users outside the module.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/leds/led-class.c | 3 +--
 include/linux/leds.h     | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index eaeb433dcc3e..859056dd1dee 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -256,7 +256,7 @@ static const struct class leds_class = {
  * Returns the LED device parsed from the phandle specified in the "leds"
  * property of a device tree node or a negative error-code on failure.
  */
-struct led_classdev *of_led_get(struct device_node *np, int index)
+static struct led_classdev *of_led_get(struct device_node *np, int index)
 {
 	struct device *led_dev;
 	struct device_node *led_node;
@@ -270,7 +270,6 @@ struct led_classdev *of_led_get(struct device_node *np, int index)
 
 	return led_module_get(led_dev);
 }
-EXPORT_SYMBOL_GPL(of_led_get);
 
 /**
  * led_put() - release a LED device
diff --git a/include/linux/leds.h b/include/linux/leds.h
index b3f0aa081064..b16b803cc1ac 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -294,7 +294,6 @@ void led_remove_lookup(struct led_lookup_data *led_lookup);
 struct led_classdev *__must_check led_get(struct device *dev, char *con_id);
 struct led_classdev *__must_check devm_led_get(struct device *dev, char *con_id);
 
-extern struct led_classdev *of_led_get(struct device_node *np, int index);
 extern void led_put(struct led_classdev *led_cdev);
 struct led_classdev *__must_check devm_of_led_get(struct device *dev,
 						  int index);
-- 
2.47.2


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

end of thread, other threads:[~2025-12-11 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-10 10:43 [PATCH v1 1/1] leds: Unexport of_led_get() Jonathan Brophy
2025-12-10 12:33 ` andriy.shevchenko
2025-12-10 18:30   ` Jonathan Brophy
2025-12-10 21:54     ` andriy.shevchenko
2025-12-11  0:49       ` Jonathan Brophy
2025-12-11 13:51         ` andriy.shevchenko
2025-12-11 12:34       ` Alexander Dahl
2025-12-11 13:46         ` andriy.shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2025-06-30  9:26 Andy Shevchenko

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