From: Pavel Machek <pavel@ucw.cz>
To: Craig McQueen <craig.mcqueen@innerrange.com>
Cc: linux-leds@vger.kernel.org
Subject: Re: [PATCH] led-triggers: allow writing 'default' to sysfs trigger attr
Date: Tue, 28 Nov 2017 13:07:52 +0100 [thread overview]
Message-ID: <20171128120752.GA14905@amd> (raw)
In-Reply-To: <20171128063820.87534-1-craig.mcqueen@innerrange.com>
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
On Tue 2017-11-28 17:38:20, Craig McQueen wrote:
> It calls led_trigger_set_default() to set the LED to its default
> trigger.
This needs corresponding change to documentation, at the very least.
Pavel
> drivers/leds/led-triggers.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
> index 431123b048a2..f090a7806017 100644
> --- a/drivers/leds/led-triggers.c
> +++ b/drivers/leds/led-triggers.c
> @@ -49,6 +49,11 @@ ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr,
> goto unlock;
> }
>
> + if (sysfs_streq(buf, "default")) {
> + led_trigger_set_default(led_cdev);
> + goto unlock;
> + }
> +
> down_read(&triggers_list_lock);
> list_for_each_entry(trig, &trigger_list, next_trig) {
> if (sysfs_streq(buf, trig->name)) {
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-11-28 12:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 6:38 [PATCH] led-triggers: allow writing 'default' to sysfs trigger attr Craig McQueen
2017-11-28 12:07 ` Pavel Machek [this message]
2017-11-28 19:38 ` Jacek Anaszewski
2017-11-28 19:38 ` Jacek Anaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171128120752.GA14905@amd \
--to=pavel@ucw.cz \
--cc=craig.mcqueen@innerrange.com \
--cc=linux-leds@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox