lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181209190037.GC6331@amd>
Date:   Sun, 9 Dec 2018 20:00:37 +0100
From:   Pavel Machek <pavel@....cz>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc:     linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        krzk@...nel.org
Subject: Re: [PATCH 2/2] led: triggers: Add LED_INIT_DEFAULT_TRIGGER flag

> Set the flag in the led_trigger_set_default(). It is expected to be
> cleared in the activate() op of a trigger after trigger fwnode
> initialization data is parsed and applied. This should happen only
> once after LED class device registration, to allow leaving triggers
> in the idle state on re-apply and let the users apply their own
> settings without being interfered with the default ones.

This is not exactly english :-(. "without interference from"?

I guess we could wait with this till we have an in-tree user?

Thanks,
								Pavel

> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@...il.com>
> ---
>  drivers/leds/led-triggers.c | 2 ++
>  include/linux/leds.h        | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
> index 52b12e601ebe..9421222ca7a0 100644
> --- a/drivers/leds/led-triggers.c
> +++ b/drivers/leds/led-triggers.c
> @@ -201,10 +201,12 @@ void led_trigger_set_default(struct led_classdev *led_cdev)
>  	down_write(&led_cdev->trigger_lock);
>  	list_for_each_entry(trig, &trigger_list, next_trig) {
>  		if (!strcmp(led_cdev->default_trigger, trig->name)) {
> +			led_cdev->flags |= LED_INIT_DEFAULT_TRIGGER;
>  			led_trigger_set(led_cdev, trig);
>  			break;
>  		}
>  	}
> +
>  	up_write(&led_cdev->trigger_lock);
>  	up_read(&triggers_list_lock);
>  }
> diff --git a/include/linux/leds.h b/include/linux/leds.h
> index 7393a316d9fa..6f05a5816371 100644
> --- a/include/linux/leds.h
> +++ b/include/linux/leds.h
> @@ -51,6 +51,7 @@ struct led_classdev {
>  #define LED_PANIC_INDICATOR	BIT(20)
>  #define LED_BRIGHT_HW_CHANGED	BIT(21)
>  #define LED_RETAIN_AT_SHUTDOWN	BIT(22)
> +#define LED_INIT_DEFAULT_TRIGGER BIT(23)
>  
>  	/* set_brightness_work / blink_timer flags, atomic, private. */
>  	unsigned long		work_flags;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ