public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/kobject: Explain device.groups
@ 2011-08-16 16:44 Bart Van Assche
  2011-08-16 16:50 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2011-08-16 16:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Randy Dunlap, rpearson

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-16 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-16 16:44 [PATCH] docs/kobject: Explain device.groups Bart Van Assche
2011-08-16 16:50 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox