From: Andrew Morton <akpm@linux-foundation.org>
To: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: linux-kernel@vger.kernel.org, rpurdie@rpsys.net
Subject: Re: [PATCH] leds: make sure led->trigger is valid before calling trigger->activate
Date: Tue, 24 Jun 2008 14:02:35 -0700 [thread overview]
Message-ID: <20080624140235.ef3f4d52.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080619114847.GA13752@doriath.ww600.siemens.net>
On Thu, 19 Jun 2008 15:48:47 +0400
Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> ---
> drivers/leds/led-triggers.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
> index 0f242b3..f910eaf 100644
> --- a/drivers/leds/led-triggers.c
> +++ b/drivers/leds/led-triggers.c
> @@ -111,16 +111,17 @@ void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger)
> flags);
> if (led_cdev->trigger->deactivate)
> led_cdev->trigger->deactivate(led_cdev);
> + led_cdev->trigger = NULL;
> led_set_brightness(led_cdev, LED_OFF);
> }
> if (trigger) {
> write_lock_irqsave(&trigger->leddev_list_lock, flags);
> list_add_tail(&led_cdev->trig_list, &trigger->led_cdevs);
> write_unlock_irqrestore(&trigger->leddev_list_lock, flags);
> + led_cdev->trigger = trigger;
> if (trigger->activate)
> trigger->activate(led_cdev);
> }
> - led_cdev->trigger = trigger;
> }
> EXPORT_SYMBOL_GPL(led_trigger_set);
>
The changelog tells us what the patch does, but it doesn't tell us
why it does it.
This matters. For a start, there is no way in which I (at least)
am able to determine whether this change is needed in 2.6.26 nor
in 2.6.25.x.
next prev parent reply other threads:[~2008-06-24 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 11:48 [PATCH] leds: make sure led->trigger is valid before calling trigger->activate Dmitry Baryshkov
2008-06-22 17:00 ` Dmitry Baryshkov
2008-06-24 21:02 ` Andrew Morton [this message]
2008-06-25 9:50 ` Dmitry Baryshkov
2008-06-25 10:18 ` Richard Purdie
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=20080624140235.ef3f4d52.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dbaryshkov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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