Skip to contentSkip to conversation

led: core: fix misleading comment after workqueue removal from drivers

PATCH Applied Heiner Kallweit 2 participants 2 messages Jan 21, 2016 – Jan 22, 2016 LED

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 led: core: fix misleading comment after workqueue removal from drivers

Now that workqueues have been removed from individual drivers and were replaced with a core-internal workqueue we shouldn't encourage people to add new workqueues to drivers.

---
v2:
- make comment simpler and clearer

---
 include/linux/leds.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/leds.h +4 -2
index bc1476f..e3470e7 100644
@@ -49,8 +49,10 @@ struct led_classdev {
 #define LED_SYSFS_DISABLE	(1 << 22)
 #define LED_DEV_CAP_FLASH	(1 << 23)
 
-	/* Set LED brightness level */
-	/* Must not sleep, use a workqueue if needed */
+	/* Set LED brightness level
+	 * Must not sleep. Use brightness_set_blocking for drivers
+	 * that can sleep while setting brightness.
+	 */
 	void		(*brightness_set)(struct led_classdev *led_cdev,
 					  enum led_brightness brightness);
 	/*
Signature · 1 line
2.7.0
#1 lore raw

Hi Heiner,

Applied to devel branch of LED git. I will merge it to the for-next branch after merge window is closed.

Thanks,
Jacek Anaszewski

Quoted 30 lines · Heiner Kallweit

Now that workqueues have been removed from individual drivers and were replaced with a core-internal workqueue we shouldn't encourage people to add new workqueues to drivers.

---
v2:
- make comment simpler and clearer

---
  include/linux/leds.h | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/leds.h +4 -2
index bc1476f..e3470e7 100644
@@ -49,8 +49,10 @@ struct led_classdev {
  #define LED_SYSFS_DISABLE	(1 << 22)
  #define LED_DEV_CAP_FLASH	(1 << 23)
 
-	/* Set LED brightness level */
-	/* Must not sleep, use a workqueue if needed */
+	/* Set LED brightness level
+	 * Must not sleep. Use brightness_set_blocking for drivers
+	 * that can sleep while setting brightness.
+	 */
  	void		(*brightness_set)(struct led_classdev *led_cdev,
  					  enum led_brightness brightness);
  	/*