From: Bart Van Assche <bvanassche@acm.org>
To: linux-kernel@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
Randy Dunlap <rdunlap@xenotime.net>,
rpearson@systemfabricworks.com
Subject: [PATCH] docs/kobject: Explain device.groups
Date: Tue, 16 Aug 2011 18:44:06 +0200 [thread overview]
Message-ID: <201108161844.07095.bvanassche@acm.org> (raw)
Many drivers use device_create_file() where device.groups should be
used instead. Since this has not yet been documented, add a note in
Documentation/kobject.txt that explains why device.groups should be
used.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
Documentation/kobject.txt | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index 3ab2472..0283c86 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -171,7 +171,10 @@ call to kobject_uevent():
Use the KOBJ_ADD action for when the kobject is first added to the kernel.
This should be done only after any attributes or children of the kobject
have been initialized properly, as userspace will instantly start to look
-for them when this call happens.
+for them when this call happens. As an example, device attributes must be
+created by initializing device.groups properly before calling
+device_register() instead of calling device_create_file() after the device
+has been registered.
When the kobject is removed from the kernel (details on how to do that is
below), the uevent for KOBJ_REMOVE will be automatically created by the
--
1.7.3.4
next reply other threads:[~2011-08-16 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 16:44 Bart Van Assche [this message]
2011-08-16 16:50 ` [PATCH] docs/kobject: Explain device.groups Greg KH
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=201108161844.07095.bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=rpearson@systemfabricworks.com \
/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