On 5/2/19 10:06 PM, Pavel Machek wrote:
On Thu 2019-05-02 21:28:06, Jacek Anaszewski wrote:
On 5/2/19 9:13 PM, Pavel Machek wrote:
Hi!
+++ b/drivers/leds/led-class.c
@@ -57,6 +57,7 @@ static ssize_t brightness_store(struct device *dev,
if (state == LED_OFF)
led_trigger_remove(led_cdev);
led_set_brightness(led_cdev, state);
+ flush_work(&led_cdev->set_brightness_work);
Is this really required here? It creates non-uniform brightness
setting behavior depending on whether it is set from sysfs or
by in-kernel call to led_set_brightness().
This fixes the echo 0 > brightness; echo 1 > brightness. It has to be
at a place where we can sleep.
If you have better idea, it is welcome, but it would be good to fix
the bug.
Currently not, so I applied the patch in this shape.
Thanks!
This is actually something that makes sense for stable.. perhaps the
bots can pick it up.
I was thinking of it, but finally decided to submit this patch
to linux-stable when it will prove not having side effects.
But if you think it is ready for stable then I can add
relevant "Fixes" tag. Do you think that below will be an appropriate
base to refer to?
Fixes 1afcadfcd184 ("leds: core: Use set_brightness_work for the blocking
op")
Yes, that looks right. If you can add fixes: and cc: stable tags, the
rest should happen automagically.
Cc: stable@xxxxxxxxxx is exactly for what it claims - sending a copy
to that list.
"Fixes:" seems to be always enough for the bots to pick a patch.
Tag added.
--
Best regards,
Jacek Anaszewski
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel