History log of /include/linux/kobject.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3e8d7b2478401b2f25f4566a90faad54f7d6d07 22-Dec-2011 Kay Sievers <kay.sievers@vrfy.org> kobject: remove kset_find_obj_hinted()

Now that there are no in-kernel users of this function, remove it as it
is no longer needed.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
b9075fa968a0a4347aef35e235e2995c0e57dddd 01-Nov-2011 Joe Perches <joe@perches.com> treewide: use __printf not __attribute__((format(printf,...)))

Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/include/linux/kobject.h
60063497a95e716c9a689af3be2687d261f115b4 27-Jul-2011 Arun Sharma <asharma@fb.com> atomic: use <linux/atomic.h>

This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/include/linux/kobject.h
b38360a284f8acab4ae431b387c05a4e19ff4129 07-Feb-2011 Randy Dunlap <randy.dunlap@oracle.com> kobject.h: fix build when CONFIG_HOTPLUG is disabled

When CONFIG_HOTPLUG is not enabled, the inline function add_uevent_var()
needs to have its __attribute__ before the function name/parameters,
otherwise there are syntax errors.

linux-next-20110207/include/linux/kobject.h:232: error: expected ',' or ';' before '{' token

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
9b99b7f84ea520d2ecaf816bde247a1ad07e454e 01-Jan-2011 Bart Van Assche <bvanassche@acm.org> kobject: Add missing format attribute specifications

Several functions in <linux/kobject.h> accept printf-style arguments.
Some of these functions have been annotated with a format attribute
declaration while others have not been annotated. Add a format attribute
specification where it is missing.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
c25d1dfbd403209025df41a737f82ce8f43d93f5 29-Sep-2010 Robin Holt <holt@sgi.com> kobject: Introduce kset_find_obj_hinted.

One call chain getting to kset_find_obj is:
link_mem_sections()
find_mem_section()
kset_find_obj()

This is done during boot. The memory sections were added in a linearly
increasing order and link_mem_sections tends to utilize them in that
same linear order.

Introduce a kset_find_obj_hinted which is passed the result of the
previous kset_find_obj which it uses for a quick "is the next object
our desired object" check before falling back to the old behavior.

Signed-off-by: Robin Holt <holt@sgi.com>
To: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
8488a38f4d2f43bd55a3e0db4cd57a5bef3af6d6 11-Aug-2010 David Howells <dhowells@redhat.com> kobject: Break the kobject namespace defs into their own header

Break the kobject namespace defs into their own header to avoid a header file
inclusion ordering problem between linux/sysfs.h and linux/kobject.h.

This fixes the build breakage on older versions of gcc.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
608b4b9548dedf4185ca47edcaae4bff2ceb62de 05-May-2010 Eric W. Biederman <ebiederm@xmission.com> netns: Teach network device kobjects which namespace they are in.

The problem. Network devices show up in sysfs and with the network
namespace active multiple devices with the same name can show up in
the same directory, ouch!

To avoid that problem and allow existing applications in network namespaces
to see the same interface that is currently presented in sysfs, this
patch enables the tagging directory support in sysfs.

By using the network namespace pointers as tags to separate out the
the sysfs directory entries we ensure that we don't have conflicts
in the directories and applications only see a limited set of
the network devices.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
be867b194a3ae3c680c29521287ae49b4d44d420 03-May-2010 Serge E. Hallyn <serue@us.ibm.com> sysfs: Comment sysfs directory tagging logic

Add some in-line comments to explain the new infrastructure, which
was introduced to support sysfs directory tagging with namespaces.
I think an overall description someplace might be good too, but it
didn't really seem to fit into Documentation/filesystems/sysfs.txt,
which appears more geared toward users, rather than maintainers, of
sysfs.

(Tejun, please let me know if I can make anything clearer or failed
altogether to comment something that should be commented.)

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
bc451f2058238013e1cdf4acd443c01734d332f0 30-Mar-2010 Eric W. Biederman <ebiederm@xmission.com> kobj: Add basic infrastructure for dealing with namespaces.

Move complete knowledge of namespaces into the kobject layer
so we can use that information when reporting kobjects to
userspace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
52cf25d0ab7f78eeecc59ac652ed5090f69b619e 19-Jan-2010 Emese Revfy <re.emese@gmail.com> Driver core: Constify struct sysfs_ops in struct kobj_type

Constify struct sysfs_ops.

This is part of the ops structure constification
effort started by Arjan van de Ven et al.

Benefits of this constification:

* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime

* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime

* potentially better optimized code as the compiler
can assume that the const data cannot be changed

* the compiler/linker move const data into .rodata
and therefore exclude them from false sharing

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Acked-by: David Teigland <teigland@redhat.com>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
9cd43611ccfb46632bfa7d19f688924ea93f1613 31-Dec-2009 Emese Revfy <re.emese@gmail.com> kobject: Constify struct kset_uevent_ops

Constify struct kset_uevent_ops.

This is part of the ops structure constification
effort started by Arjan van de Ven et al.

Benefits of this constification:

* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime

* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime

* potentially better optimized code as the compiler
can assume that the const data cannot be changed

* the compiler/linker move const data into .rodata
and therefore exclude them from false sharing

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f67f129e519fa87f8ebd236b6336fe43f31ee141 01-Mar-2009 Ming Lei <tom.leiming@gmail.com> Driver core: implement uevent suppress in kobject

This patch implements uevent suppress in kobject and removes it
from struct device, based on the following ideas:

1,Uevent sending should be one attribute of kobject, so suppressing it
in kobject layer is more natural than in device layer. By this way,
we can do it for other objects embedded with kobject.

2,It may save several bytes for each instance of struct device.(On my
omap3(32bit ARM) based box, can save 8bytes per device object)

This patch also introduces dev_set|get_uevent_suppress() helpers to
set and query uevent_suppress attribute in case to help kobject
as private part of struct device in future.

[This version is against the latest driver-core patch set of Greg,please
ignore the last version.]

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
1fa5ae857bb14f6046205171d98506d8112dd74e 25-Jan-2009 Kay Sievers <kay.sievers@vrfy.org> driver core: get rid of struct device's bus_id string array

Now that all users of bus_id is gone, we can remove it from struct
device.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
ff7ea79cf7c3a481851bd4b2185fdeb6ce4afa29 24-Jul-2008 Nishanth Aravamudan <nacc@us.ibm.com> mm: create /sys/kernel/mm

Add a kobject to create /sys/kernel/mm when sysfs is mounted. The kobject
will exist regardless. This will allow for the hugepage related sysfs
directories to exist under the mm "subsystem" directory. Add an ABI file
appropriately.

[kosaki.motohiro@jp.fujitsu.com: fix build]
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/include/linux/kobject.h
a231934bdf086a4fefc0df06e669499125a9db6f 02-Jun-2008 Richard Kennedy <richard@rsk.demon.co.uk> kobject: reorder kobject to save space on 64 bit builds

reorder kobject to save space on 64 bit builds.
shrinks from 72 to 64 bytes & moves allocated kobject to a smaller
slab.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
aab0de245150c09e61c30962feb16aacde508dc3 02-May-2008 Kay Sievers <kay.sievers@vrfy.org> driver core: remove KOBJ_NAME_LEN define

Kobjects do not have a limit in name size since a while, so stop
pretending that they do.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
735643ee6cc5249bfac07fcad0946a5e7aff4423 30-Apr-2008 Robert P. J. Day <rpjday@crashcourse.ca> Remove "#ifdef __KERNEL__" checks from unexported headers

Remove the "#ifdef __KERNEL__" tests from unexported header files in
linux/include whose entire contents are wrapped in that preprocessor
test.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/include/linux/kobject.h
79a6ee42fd81be9abc6bdab08f932875924b26a5 25-Jan-2008 Greg Kroah-Hartman <gregkh@suse.de> Kobject: fix coding style issues in kobject.h

Finally clean up the odd spaces and other mess in kobject.h

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00 20-Dec-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: change sysdev classes to use dynamic kobject names

All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
528a4bf1d5ffed310d26fc1d82d45c02949f71cf 20-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: remove kobject_unregister() as no one uses it anymore

There are no in-kernel users of kobject_unregister() so it should be
removed.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
0f4dafc0563c6c49e17fe14b3f5f356e4c4b8806 19-Dec-2007 Kay Sievers <kay.sievers@vrfy.org> Kobject: auto-cleanup on final unref

We save the current state in the object itself, so we can do proper
cleanup when the last reference is dropped.

If the initial reference is dropped, the object will be removed from
sysfs if needed, if an "add" event was sent, "remove" will be send, and
the allocated resources are released.

This allows us to clean up some driver core usage as well as allowing us
to do other such changes to the rest of the kernel.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
12e339ac6e31a34fe42396aec8fb1c0b43caf61e 09-Apr-2002 Greg Kroah-Hartman <gregkh@suse.de> Kset: remove kset_add function

No one is calling this anymore, so just remove it and hard-code the one
internal-use of it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
6d06adfaf82d154023141ddc0c9de18b6a49090b 19-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: remove kobject_register()

The function is no longer used by anyone in the kernel, and it prevents
the proper sending of the kobject uevent after the needed files are set
up by the caller. kobject_init_and_add() can be used in its place.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f9cb074bff8e762ef24c44678a5a7d907f82fbeb 18-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: rename kobject_init_ng() to kobject_init()

Now that the old kobject_init() function is gone, rename
kobject_init_ng() to kobject_init() to clean up the namespace.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
e1543ddf739b22a8c4218716ad50c26b3e147403 18-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: remove kobject_init() as no one uses it anymore

The old kobject_init() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
b2d6db5878a0832659ed58476357eea2db915550 18-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: rename kobject_add_ng() to kobject_add()

Now that the old kobject_add() function is gone, rename kobject_add_ng()
to kobject_add() to clean up the namespace.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
9e7bbccd0290e720e0874443932869c55f63d5a8 18-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> Kobject: remove kobject_add() as no one uses it anymore

The old kobject_add() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
d76e15fb20eeb7632ef38876a884fe3508b2c01d 27-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> driver core: make /sys/power a kobject

/sys/power should not be a kset, that's overkill. This patch renames it
to power_kset and fixes up all usages of it in the tree.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
2fb9113b974c3c7c43e76647bd5077238e274e1c 07-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: remove subsystem_(un)register functions

These functions are no longer used and are the last remants of the old
subsystem crap. So delete them for good.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
0ff21e46630abce11fdaaffabd72bbd4eed5ac2c 06-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: convert kernel_kset to be a kobject

kernel_kset does not need to be a kset, but a much simpler kobject now
that we have kobj_attributes.

We also rename kernel_kset to kernel_kobj to catch all users of this
symbol with a build error instead of an easy-to-ignore build warning.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
5c03c7ab886859eb195440dbb6ccb8c30c4e84cc 03-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: remove decl_subsys macro

This macro is no longer used. ksets should be created dynamically with
a call to kset_create_and_add() not declared statically.

Yes, there are 5 remaining static struct kset usages in the kernel tree,
but they will be fixed up soon.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f62ed9e33b3ccff54d66b08f82d11940bb9e269b 05-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> firmware: change firmware_kset to firmware_kobj

There is no firmware "subsystem" it's just a directory in /sys that
other portions of the kernel want to hook into. So make it a kobject
not a kset to help alivate anyone who tries to do some odd kset-like
things with this.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
000f2a4d8cfc1e1cbc0aa98136015e7ae7719b46 02-Nov-2007 Kay Sievers <kay.sievers@vrfy.org> Driver Core: kill subsys_attribute and default sysfs ops

Remove the no longer needed subsys_attributes, they are all converted to
the more sensical kobj_attributes.

There is no longer a magic fallback in sysfs attribute operations, all
kobjects which create simple attributes need explicitely a ktype
assigned, which tells the core what was intended here.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
9e5f7f9abe18a4f134585a2de016974cbda80539 02-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> firmware: export firmware_kset so that people can use that instead of the braindead firmware_register interface

Needed for future firmware subsystem cleanups.

In the end, the firmware_register/unregister functions will be deleted
entirely, but we need this symbol so that subsystems can migrate over.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
23b5212cc7422f475b82124334b64277b5b43013 02-Nov-2007 Kay Sievers <kay.sievers@vrfy.org> Driver Core: add kobj_attribute handling

Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no
need for special kset operations, we want to be able to use
simple attribute operations at any kobject, not only ksets.

The whole concept of any default sysfs attribute operations
will go away with the upcoming removal of subsys_sysfs_ops.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
039a5dcd2fc45188a2d522df630db4f7ef903a0f 01-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: convert /sys/power to use kset_create

Dynamically create the kset instead of declaring it statically. We also
rename power_subsys to power_kset to catch all users of the variable and
we properly export it so that people don't have to guess that it really
is present in the system.

The pseries code is wierd, why is it createing /sys/power if CONFIG_PM
is disabled? Oh well, stupid big boxes ignoring config options...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
2d72fc00a1fb055e6127ccd30cac3f0eafaa98d0 01-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: convert /sys/hypervisor to use kobject_create

We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

We also rename hypervisor_subsys to hypervisor_kset to catch all users
of the variable.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
bd35b93d8049ab47b5bfaf6b10ba39badf21d1c3 29-Oct-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: convert kernel_subsys to use kset_create

Dynamically create the kset instead of declaring it statically. We also
rename kernel_subsys to kernel_kset to catch all users of this symbol
with a build error instead of an easy-to-ignore build warning.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
e5e38a86c0bbe8475543f10f0a48393a45df5182 30-Oct-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: remove decl_subsys_name

The last user of this macro (pci hotplug core) is now switched over to
using a dynamic kset, so this macro is no longer needed at all.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
43968d2f1648f4dc92437dc0363a3e88377445b3 06-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: get rid of kobject_kset_add_dir

kobject_kset_add_dir is only called in one place so remove it and use
kobject_create() instead.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
4ff6abff832fbc6cb1d769f6106c841bc2b09f63 06-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: get rid of kobject_add_dir

kobject_create_and_add is the same as kobject_add_dir, so drop
kobject_add_dir.


Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
3f9e3ee9dc3605e5c593b5d708494571fb0d3970 05-Nov-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: add kobject_create_and_add function

This lets users create dynamic kobjects much easier.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
b727c702896f88d2ff6c3e03bd011d7c3dffe3e1 27-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: add kset_create_and_add function

Now ksets can be dynamically created on the fly, no static definitions
are required. Thanks to Miklos for hints on how to make this work
better for the callers.

And thanks to Kay for finding some stupid bugs in my original version
and pointing out that we need to handle the fact that kobject's can have
a kset as a parent and to handle that properly in kobject_add().

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
12d03da7c19366268bdbc9fb0cd08d719c0cc283 16-Oct-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: remove kobj_set_kset_s as no one is using it anymore

What a confusing name for a macro...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
3514faca19a6fdc209734431c509631ea92b094e 16-Oct-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: remove struct kobj_type from struct kset

We don't need a "default" ktype for a kset. We should set this
explicitly every time for each kset. This change is needed so that we
can make ksets dynamic, and cleans up one of the odd, undocumented
assumption that the kset/kobject/ktype model has.

This patch is based on a lot of help from Kay Sievers.

Nasty bug in the block code was found by Dave Young
<hidave.darkstar@gmail.com>

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
c11c4154e7ff4cebfadad849b1e22689d759c3f4 04-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: add kobject_init_and_add function

Also add a kobject_init_and_add function which bundles up what a lot of
the current callers want to do all at once, and it properly handles the
memory usages, unlike kobject_register();

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
244f6cee9a928103132a722292bfa0eb84114b07 04-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: add kobject_add_ng function

This is what the kobject_add function is going to become.

Add this to the kernel and then we can convert the tree over to use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
e86000d042d23904bbb609af2f8618a541cf129b 04-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: add kobject_init_ng function

This is what the kobject_init function is going to become.

Add this to the kernel and then we can convert the tree over to use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
18041f4775688af073d9b3ab0ffc262c1847e60b 04-Dec-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: make kobject_cleanup be static

No one except the kobject core calls it so make the function static.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f0e7e1bd77d450ebfa12153b90f93ad46616ab4a 27-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: update the copyrights

I've been hacking on these files for a while now, might as well make it
official...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
6adf7554b9c70eac83251e00aa4a55f7dc830cec 27-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> kset: add some kerneldoc to help describe what these strange things are

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
e4bc16621d82ee1fd3685dcbf889a7c49891847b 26-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> driver core: remove subsystem_init()

There is only one user of it, and it is only a wrapper for kset_init().

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
a4e8b912541d5372ae049a3b7c1979968e52c40b 20-Sep-2007 Tejun Heo <htejun@gmail.com> sysfs: move sysfs file poll implementation to sysfs_open_dirent

Sysfs file poll implementation is scattered over sysfs and kobject.
Event numbering is done in sysfs_dirent but wait itself is done on
kobject. This not only unecessarily bloats both kobject and
sysfs_dirent but is also buggy - if a sysfs_dirent is removed while
there still are pollers, the associaton betwen the kobject and
sysfs_dirent breaks and kobject may be freed with the pollers still
sleeping on it.

This patch moves whole poll implementation into sysfs_open_dirent.
Each time a sysfs_open_dirent is created, event number restarts from 1
and pollers sleep on sysfs_open_dirent. As event sequence number is
meaningless without any open file and pollers should have open file
and thus sysfs_open_dirent, this ephemeral event counting works and is
a saner implementation.

This patch fixes the dnagling sleepers bug and reduces the sizes of
kobject and sysfs_dirent by one pointer.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
5c5daf657cb5f963a38413f2852279d7a3843144 12-Aug-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUG

Move uevent specific logic from the core into kobject_uevent.c, which
does no longer require to link the unused string array if hotplug
is not compiled in.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
90bc61359de0148f8627073d68a22edc7ed9893d 31-Jul-2007 Eric W. Biederman <ebiederm@xmission.com> sysfs: Remove first pass at shadow directory support

While shadow directories appear to be a good idea, the current scheme
of controlling their creation and destruction outside of sysfs appears
to be a locking and maintenance nightmare in the face of sysfs
directories dynamically coming and going. Which can now occur for
directories containing network devices when CONFIG_SYSFS_DEPRECATED is
not set.

This patch removes everything from the initial shadow directory support
that allowed the shadow directory creation to be controlled at a higher
level. So except for a few bits of sysfs_rename_dir everything from
commit b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 is now gone.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
ce2c9cb0259acd2aed184499ebe41ab00da13b25 13-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject: remove the static array for the name

Due to historical reasons, struct kobject contained a static array for
the name, and a dynamic pointer in case the name got bigger than the
array. That's just dumb, as people didn't always know which variable to
reference, even with the accessor for the kobject name.

This patch removes the static array, potentially saving a lot of memory
as the majority of kobjects do not have a very long name.

Thanks to Kay for the idea to do this.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
1ef4cfac01fb5e98900f5bdb2a722aac1daff11b 13-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> Driver core: remove subsys_get()

There are no more subsystems, it's a kset now so remove the function and
the only two users, which are in the driver core.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
6e9d930d167f8957a12a80515f3c417a98296378 13-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> Driver core: remove subsys_put()

There are no more subsystems, it's a kset now so remove the function and
the only two users, which are in the driver core.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
27f20e5e4e60a7f28010eeb34399fe0cc9a1a235 13-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> Driver core: remove kset_set_kset_s

This macro is only used by the driver core and is held over from when we
had subsystems. It is not needed anymore.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
d6b05b84edf590ff872de6310ec20d60b5b37dd2 13-Sep-2007 Greg Kroah-Hartman <gregkh@suse.de> Driver core: remove subsys_set_kset

This macro is only used by the driver core and is held over from when we
had subsystems. It is not needed anymore.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
7eff2e7a8b65c25920207324e56611150eb1cd9a 14-Aug-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: change add_uevent_var to use a struct

This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.

Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
a56156489dbdc60ac39a77b8a988d375b2f273a0 27-Jul-2007 Randy Dunlap <randy.dunlap@oracle.com> kset: kernel-doc cleanups

Removed kernel-doc marker (/**) from struct kset -- each struct member
still needs annotation.

Corrected one parameter name so that kernel-doc matches the macro.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
ff2ee8cf30199bb625706a43d9cc3bd1ff5ebe42 09-Apr-2002 Greg Kroah-Hartman <gregkh@suse.de> kobject: put kobject_actions in kobject.h

This prevents the extern declaration in the driver core.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
60a96a59569bab85571d0089682109bd3324e896 08-Jul-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: accept all valid action-strings in uevent-trigger

This allows the uevent file to handle any type of uevent action to be
triggered by userspace instead of just the "add" uevent.


Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
608e266a2d4e62c1b98c1c573064b6afe8c06a58 13-Jun-2007 Tejun Heo <htejun@gmail.com> sysfs: make kobj point to sysfs_dirent instead of dentry

As kobj sysfs dentries and inodes are gonna be made reclaimable,
dentry can't be used as naming token for sysfs file/directory, replace
kobj->dentry with kobj->sd. The only external interface change is
shadow directory handling. All other changes are contained in kobj
and sysfs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
823bccfc4002296ba88c3ad0f049e1abd8108d30 13-Apr-2007 Greg Kroah-Hartman <gregkh@suse.de> remove "struct subsystem" as it is no longer needed

We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.

Thanks to Kay for fixing the bugs in this patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
3106d46f51a1a72fdbf071ebc0800a9bcfcbc544 06-Apr-2007 Adrian Bunk <bunk@stusta.de> the overdue removal of the mount/umount uevents

This patch contains the overdue removal of the mount/umount uevents.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
4628803062d93dadc6ba8e801fd075526904a38c 09-Apr-2007 Greg Kroah-Hartman <gregkh@suse.de> kobject core: remove rwsem from struct subsystem

It isn't used at all by the driver core anymore, and the few usages of
it within the kernel have now all been fixed as most of them were using
it incorrectly. So remove it.

Now the whole struct subsys can be removed from the system, but that's
for a later patch...

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
864062457a2e444227bd368ca5f2a2b740de604f 14-Mar-2007 Kay Sievers <kay.sievers@vrfy.org> driver core: fix namespace issue with devices assigned to classes

- uses a kset in "struct class" to keep track of all directories
belonging to this class
- merges with the /sys/devices/virtual logic.
- removes the namespace-dir if the last member of that class
leaves the directory.

There may be locking or refcounting fixes left, I stopped when it seemed
to work with network and sound modules. :)

From: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 24-Jan-2007 Eric W. Biederman <ebiederm@xmission.com> sysfs: Shadow directory support

The problem. When implementing a network namespace I need to be able
to have multiple network devices with the same name. Currently this
is a problem for /sys/class/net/*.

What I want is a separate /sys/class/net directory in sysfs for each
network namespace, and I want to name each of them /sys/class/net.

I looked and the VFS actually allows that. All that is needed is
for /sys/class/net to implement a follow link method to redirect
lookups to the real directory you want.

Implementing a follow link method that is sensitive to the current
network namespace turns out to be 3 lines of code so it looks like a
clean approach. Modifying sysfs so it doesn't get in my was is a bit
trickier.

I am calling the concept of multiple directories all at the same path
in the filesystem shadow directories. With the directory entry really
at that location the shadow master.

The following patch modifies sysfs so it can handle a directory
structure slightly different from the kobject tree so I can implement
the shadow directories for handling /sys/class/net/.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
542cfce6f36e8c43f71ae9c235b78497f350ae55 19-Dec-2006 Aneesh Kumar K.V <aneesh.kumar@gmail.com> kobject: kobject_uevent() returns manageable value

Since kobject_uevent() function does not return an integer value to
indicate if its operation was completed with success or not, it is worth
changing it in order to report a proper status (success or error) instead
of returning void.

[randy.dunlap@oracle.com: Fix inline kobject functions]
Cc: Mauricio Lin <mauriciolin@gmail.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
8a82472f86bf693b8e91ed56c9ca4f62fbbdcfa3 20-Nov-2006 Cornelia Huck <cornelia.huck@de.ibm.com> driver core: Introduce device_move(): move a device to a new parent.

Provide a function device_move() to move a device to a new parent device. Add
auxilliary functions kobject_move() and sysfs_move_dir().
kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
interface kobject_uevent_env() is created that allows to add further
environmental data to the uevent at the kobject layer.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
4a7fb6363f2d1a6c09a10253937f672f3c7929e1 15-Aug-2006 Andrew Morton <akpm@osdl.org> add __must_check to device management code

We're getting a lot of crashes in the sysfs/kobject/device/bus/class code and
they're very hard to diagnose.

I'm suspecting that in some cases this is because drivers aren't checking
return values and aren't handling errors correctly. So the code blithely
blunders on and crashes later in very obscure ways.

There's just no reason to ignore errors which can and do occur. So the patch
sprinkles __must_check all over these APIs.

Causes 1,513 new warnings. Heh.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
5669021e40964303994a20633548732c6bb26636 01-Aug-2006 Kristen Carlson Accardi <kristen.c.accardi@intel.com> PCI: docking station: remove dock uevents

Remove uevent dock notifications. There are no consumers
of these events at present, and uevents are likely not the
correct way to send this type of event anyway.

Until I get some kind of idea if anyone in userspace cares
about dock events, I will just not send any.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
a6a888b3c20cf559c8a2e6e4d86c570dda2ef0f5 25-Jun-2006 Kristen Accardi <kristen.c.accardi@intel.com> KEVENT: add new uevent for dock

so that userspace can be notified of dock and undock events.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
/include/linux/kobject.h
4039483fd3065920f035eed39ec59085421c0a4f 09-May-2006 Michael Holzheu <holzheu@de.ibm.com> [PATCH] Driver Core: Add /sys/hypervisor when needed

To have a home for all hypervisors, this patch creates /sys/hypervisor.
A new config option SYS_HYPERVISOR is introduced, which should to be set
by architecture dependent hypervisors (e.g. s390 or Xen).

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
5b3ef14e3e9d745a512d65fcb4ef9be541226d80 22-Apr-2006 Adrian Bunk <bunk@stusta.de> [PATCH] Kobject: possible cleanups

This patch contains the following possible cleanups:
- #if 0 the following unused global function:
- subsys_remove_file()
- remove the following unused EXPORT_SYMBOL's:
- kset_find_obj
- subsystem_init
- remove the following unused EXPORT_SYMBOL_GPL:
- kobject_add_dir

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
4d17ffda331ba6030bb8c233c73d6a87954d8ea7 25-Apr-2006 Kay Sievers <kay.sievers@vrfy.org> [PATCH] Kobject: fix build error

This fixes a build error for various odd combinations of CONFIG_HOTPLUG
and CONFIG_NET.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Nigel Cunningham <ncunningham@cyclades.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
4508a7a734b111b8b7e39986237d84acb1168dd0 20-Mar-2006 NeilBrown <neilb@suse.de> [PATCH] sysfs: Allow sysfs attribute files to be pollable

It works like this:
Open the file
Read all the contents.
Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
When poll returns,
close the file and go to top of loop.
or lseek to start of file and go back to the 'read'.

Events are signaled by an object manager calling
sysfs_notify(kobj, dir, attr);

If the dir is non-NULL, it is used to find a subdirectory which
contains the attribute (presumably created by sysfs_create_group).

This has a cost of one int per attribute, one wait_queuehead per kobject,
one int per open file.

The name "sysfs_notify" may be confused with the inotify
functionality. Maybe it would be nice to support inotify for sysfs
attributes as well?

This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
to be pollable

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
7423172a50968de1905a61413c52bb070a62f5ce 13-Mar-2006 Jun'ichi Nomura <j-nomura@ce.jp.nec.com> [PATCH] kobject_add_dir

Adding kobject_add_dir() function which creates a subdirectory
for a given kobject.

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
22f98c0cd7e003b896ee52ded945081307118745 04-Mar-2006 Adrian Bunk <bunk@stusta.de> [PATCH] Kobject: kobject.h: fix a typo

It shouldn't cause real harm, but it hurts my eyes.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
fa675765afed59bb89adba3369094ebd428b930b 22-Feb-2006 Greg Kroah-Hartman <gregkh@suse.de> Revert mount/umount uevent removal

This change reverts the 033b96fd30db52a710d97b06f87d16fc59fee0f1 commit
from Kay Sievers that removed the mount/umount uevents from the kernel.
Some older versions of HAL still depend on these events to detect when a
new device has been mounted. These events are not correctly emitted,
and are broken by design, and so, should not be relied upon by any
future program. Instead, the /proc/mounts file should be polled to
properly detect this kind of event.

A feature-removal-schedule.txt entry has been added, noting when this
interface will be removed from the kernel.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f743ca5e10f4145e0b3e6d11b9b46171e16af7ce 23-Nov-2005 akpm@osdl.org <akpm@osdl.org> [PATCH] kobject_uevent CONFIG_NET=n fix

lib/lib.a(kobject_uevent.o)(.text+0x25f): In function `kobject_uevent':
: undefined reference to `__alloc_skb'
lib/lib.a(kobject_uevent.o)(.text+0x2a1): In function `kobject_uevent':
: undefined reference to `skb_over_panic'
lib/lib.a(kobject_uevent.o)(.text+0x31d): In function `kobject_uevent':
: undefined reference to `skb_over_panic'
lib/lib.a(kobject_uevent.o)(.text+0x356): In function `kobject_uevent':
: undefined reference to `netlink_broadcast'
lib/lib.a(kobject_uevent.o)(.init.text+0x9): In function `kobject_uevent_init':
: undefined reference to `netlink_kernel_create'
make: *** [.tmp_vmlinux1] Error 1

Netlink is unconditionally enabled if CONFIG_NET, so that's OK.

kobject_uevent.o is compiled even if !CONFIG_HOTPLUG, which is lazy.

Let's compound the sin.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
312c004d36ce6c739512bac83b452f4c20ab1f62 16-Nov-2005 Kay Sievers <kay.sievers@suse.de> [PATCH] driver core: replace "hotplug" by "uevent"

Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
5f123fbd80f4f788554636f02bf73e40f914e0d6 11-Nov-2005 Kay Sievers <kay.sievers@suse.de> [PATCH] merge kobject_uevent and kobject_hotplug

The distinction between hotplug and uevent does not make sense these
days, netlink events are the default.

udev depends entirely on netlink uevents. Only during early boot and
in initramfs, /sbin/hotplug is needed. So merge the two functions and
provide only one interface without all the options.

The netlink layer got a nice generic interface with named slots
recently, which is probably a better facility to plug events for
subsystem specific events.
Also the new poll() interface to /proc/mounts is a nicer way to
notify about changes than sending events through the core.
The uevents should only be used for driver core related requests to
userspace now.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
033b96fd30db52a710d97b06f87d16fc59fee0f1 11-Nov-2005 Kay Sievers <kay.sievers@suse.de> [PATCH] remove mount/umount uevents from superblock handling

The names of these events have been confusing from the beginning
on, as they have been more like claim/release events. We needed these
events for noticing HAL if storage devices have been mounted.

Thanks to Al, we have the proper solution now and can poll()
/proc/mounts instead to get notfied about mount tree changes.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
0296b2281352e4794e174b393c37f131502e09f0 11-Nov-2005 Kay Sievers <kay.sievers@suse.de> [PATCH] remove CONFIG_KOBJECT_UEVENT option

It makes zero sense to have hotplug, but not the netlink
events enabled today. Remove this option and merge the
kobject_uevent.h header into the kobject.h header file.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
fd4f2df24bc23e6b8fc069765b425c7dacf52347 21-Oct-2005 Al Viro <viro@zeniv.linux.org.uk> [PATCH] gfp_t: lib/*

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/include/linux/kobject.h
419cab3fc69588ebe35b845cc3a584ae172463de 26-Apr-2005 Dmitry Torokhov <dtor_core@ameritech.net> [PATCH] kset_hotplug_ops->name shoudl return const char *

kobject: change name() method in kset_hotplug_ops return const char *
since users shoudl not try to modify returned data.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
f3b4f3c6dec04c6c8261fe22645f07b39976595a 26-Apr-2005 Dmitry Torokhov <dtor_core@ameritech.net> [PATCH] Make kobject's name be const char *

kobject: make kobject's name const char * since users should not
attempt to change it (except by calling kobject_rename).

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/include/linux/kobject.h
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/include/linux/kobject.h