diff mbox

platform/x86: asus-wireless: Toggle airplane mode LED

Message ID 20180630001138.17363-1-jprvita@endlessm.com (mailing list archive)
State Accepted, archived
Delegated to: Andy Shevchenko
Headers show

Commit Message

João Paulo Rechi Vita June 30, 2018, 12:11 a.m. UTC
This commit makes use of a newly implemented RFKill LED trigger to
trigger the LED when all radios are blocked.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
---
 drivers/platform/x86/asus-wireless.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko July 2, 2018, 1:18 p.m. UTC | #1
On Sat, Jun 30, 2018 at 3:11 AM, João Paulo Rechi Vita
<jprvita@gmail.com> wrote:
> This commit makes use of a newly implemented RFKill LED trigger to
> trigger the LED when all radios are blocked.
>

Pushed to my review and testing queue, thanks!

P.S. Should it have Fixes tag and possible go to stable?

> Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
> ---
>  drivers/platform/x86/asus-wireless.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
> index b8e35a8d65cf..7458f7602d5e 100644
> --- a/drivers/platform/x86/asus-wireless.c
> +++ b/drivers/platform/x86/asus-wireless.c
> @@ -170,6 +170,7 @@ static int asus_wireless_add(struct acpi_device *adev)
>         data->led.brightness_get = led_state_get;
>         data->led.flags = LED_CORE_SUSPENDRESUME;
>         data->led.max_brightness = 1;
> +       data->led.default_trigger = "rfkill-none";
>         err = devm_led_classdev_register(&adev->dev, &data->led);
>         if (err)
>                 destroy_workqueue(data->wq);
> --
> 2.18.0
>
João Paulo Rechi Vita July 2, 2018, 6:52 p.m. UTC | #2
On Mon, Jul 2, 2018 at 6:18 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sat, Jun 30, 2018 at 3:11 AM, João Paulo Rechi Vita
> <jprvita@gmail.com> wrote:
>> This commit makes use of a newly implemented RFKill LED trigger to
>> trigger the LED when all radios are blocked.
>>
>
> Pushed to my review and testing queue, thanks!
>
> P.S. Should it have Fixes tag and possible go to stable?
>

Thanks! I don't think this is stable material, as it is not preventing
any kernel crash or fixing any other serious bug, and it would also
need the "rfkill-none" led trigger to be backported with it.

Maybe you were actually referring to the other patch, "platform/x86:
asus-wireless: Fix uninitialized symbol usage"? If so, I'm not sure
what is the stable policy for that kind of fix: it addresses a real
problem that was detected through static analysis, but no occurrences
have been seen in the wild. I'll leave the decision of forwarding that
to stable or not to you.

Regards,

--
João Paulo Rechi Vita
http://about.me/jprvita
diff mbox

Patch

diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
index b8e35a8d65cf..7458f7602d5e 100644
--- a/drivers/platform/x86/asus-wireless.c
+++ b/drivers/platform/x86/asus-wireless.c
@@ -170,6 +170,7 @@  static int asus_wireless_add(struct acpi_device *adev)
 	data->led.brightness_get = led_state_get;
 	data->led.flags = LED_CORE_SUSPENDRESUME;
 	data->led.max_brightness = 1;
+	data->led.default_trigger = "rfkill-none";
 	err = devm_led_classdev_register(&adev->dev, &data->led);
 	if (err)
 		destroy_workqueue(data->wq);