From: Greg KH <gregkh@linuxfoundation.org>
To: Colin Cross <ccross@android.com>
Cc: linux-kernel@vger.kernel.org,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Bryan Wu <bryan.wu@canonical.com>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH v2] leds: triggers: send uevent when changing triggers
Date: Tue, 7 Aug 2012 13:56:31 -0700 [thread overview]
Message-ID: <20120807205631.GA3889@kroah.com> (raw)
In-Reply-To: <CAMbhsRQd6djCh3z3-4mowQqzWZ+RrQKjMBi-NiV3daxJS1L35A@mail.gmail.com>
On Tue, Aug 07, 2012 at 01:47:23PM -0700, Colin Cross wrote:
> On Tue, Aug 7, 2012 at 1:42 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Tue, Aug 07, 2012 at 12:58:15PM -0700, Colin Cross wrote:
> >> Some triggers create sysfs files when they are enabled. Send a uevent
> >> "change" notification whenever the trigger is changed to allow userspace
> >> processes such as udev to modify permissions on the new files.
> >>
> >> A change notification will also be sent during registration of led class
> >> devices or led triggers if the default trigger of an led class device
> >> is found.
> >
> > Why would a change event be needed at this point in time? Nothing would
> > have changed from the original "add" notification, right?
>
> If the led class device has a default trigger configured,
> device_create will called before the trigger has been set and the
> trigger sysfs files have been created. The "change" notification will
> happen after the extra files have been created.
Ok, that make sense, and is a good reason to send the change event,
thanks for explaining it.
greg k-h
next prev parent reply other threads:[~2012-08-07 20:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 19:58 [PATCH v2] leds: triggers: send uevent when changing triggers Colin Cross
2012-08-07 20:42 ` Greg KH
2012-08-07 20:47 ` Colin Cross
2012-08-07 20:56 ` Greg KH [this message]
2012-08-07 20:57 ` Greg KH
2012-08-08 1:12 ` Henrique de Moraes Holschuh
2012-08-08 2:16 ` Bryan Wu
2012-08-14 11:34 ` Bryan Wu
2012-08-27 1:43 ` Bryan Wu
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=20120807205631.GA3889@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bryan.wu@canonical.com \
--cc=ccross@android.com \
--cc=hmh@hmh.eng.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@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;
as well as URLs for NNTP newsgroup(s).