aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-01-24Driver Core: add kobj_attribute handlingKay Sievers2-0/+39
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>
2008-01-24kset: convert struct bus_device->drivers to use kset_createGreg Kroah-Hartman3-9/+10
Dynamically create the kset instead of declaring it statically. Having 3 static kobjects in one structure is not only foolish, but ripe for nasty race conditions if handled improperly. We also rename the field to catch any potential users of it (not that there should be outside of the driver core...) Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert struct bus_device->devices to use kset_createGreg Kroah-Hartman2-10/+11
Dynamically create the kset instead of declaring it statically. Having 3 static kobjects in one structure is not only foolish, but ripe for nasty race conditions if handled improperly. We also rename the field to catch any potential users of it (not that there should be outside of the driver core...) Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert /sys/power to use kset_createGreg Kroah-Hartman6-19/+15
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>
2008-01-24kset: convert /sys/module to use kset_createGreg Kroah-Hartman3-25/+15
Dynamically create the kset instead of declaring it statically. We also rename module_subsys to module_kset to catch all users of the variable. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: move /sys/slab to /sys/kernel/slabGreg Kroah-Hartman3-3/+4
/sys/kernel is where these things should go. Also updated the documentation and tool that used this directory. Cc: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert slub to use kset_createGreg Kroah-Hartman1-8/+7
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert /sys/devices/system to use kset_createGreg Kroah-Hartman1-16/+11
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert s390 hypervisor to use kobject_createGreg Kroah-Hartman1-6/+7
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Thanks to Cornelia for the build fix. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Michael Holzheu <holzheu@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert /sys/hypervisor to use kobject_createGreg Kroah-Hartman3-7/+11
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>
2008-01-24kset: convert /sys/devices to use kset_createGreg Kroah-Hartman4-13/+11
Dynamically create the kset instead of declaring it statically. We also rename devices_subsys to devices_kset to catch all users of the variable. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert drivers/base/firmware.c to use kset_createGreg Kroah-Hartman1-3/+6
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert drivers/base/class.c to use kset_createGreg Kroah-Hartman1-7/+5
Dynamically create the kset instead of declaring it statically. The class_obj subsystem is not yet converted as it is more complex and should be going away soon with the removal of class_device from the kernel tree. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert drivers/base/bus.c to use kset_createGreg Kroah-Hartman1-4/+7
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert kernel_subsys to use kset_createGreg Kroah-Hartman8-22/+39
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>
2008-01-24kset: remove decl_subsys_nameGreg Kroah-Hartman1-5/+0
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>
2008-01-24kset: convert pci hotplug to use kset_create_and_addGreg Kroah-Hartman4-16/+15
This also renames pci_hotplug_slots_subsys to pcis_hotplug_slots_kset catch all current users with a build error instead of a build warning which can easily be missed. 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>
2008-01-24kset: convert dlm to use kset_createGreg Kroah-Hartman1-11/+9
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert gfs2 dlm to use kset_createGreg Kroah-Hartman1-12/+10
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert gfs2 to use kset_createGreg Kroah-Hartman1-6/+7
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert main fs kobject to use kobject_createGreg Kroah-Hartman5-10/+9
This also renames fs_subsys to fs_kobj to catch all current users with a build error instead of a build warning which can easily be missed. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: convert ecryptfs to use kset_createGreg Kroah-Hartman1-10/+9
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Mike Halcrow <mhalcrow@us.ibm.com> Cc: Phillip Hellewell <phillip@hellewell.homeip.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert configfs to use kobject_createGreg Kroah-Hartman1-7/+6
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert debugfs to use kobject_createGreg Kroah-Hartman1-7/+6
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert securityfs to use kobject_createGreg Kroah-Hartman1-6/+5
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert fuse to use kobject_createGreg Kroah-Hartman1-12/+14
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: get rid of kobject_kset_add_dirGreg Kroah-Hartman3-37/+20
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>
2008-01-24kobject: get rid of kobject_add_dirGreg Kroah-Hartman5-20/+8
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>
2008-01-24kobject: add kobject_create_and_add functionGreg Kroah-Hartman2-18/+66
This lets users create dynamic kobjects much easier. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kset: add kset_create_and_add functionGreg Kroah-Hartman2-2/+94
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>
2008-01-24kobject: remove kobj_set_kset_s as no one is using it anymoreGreg Kroah-Hartman1-18/+0
What a confusing name for a macro... Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: remove struct kobj_type from struct ksetGreg Kroah-Hartman36-87/+84
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>
2008-01-24kobject: add kobject_init_and_add functionGreg Kroah-Hartman2-0/+32
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>
2008-01-24kobject: add kobject_add_ng functionGreg Kroah-Hartman2-0/+69
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>
2008-01-24kobject: add kobject_init_ng functionGreg Kroah-Hartman2-0/+43
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>
2008-01-24kobject: make kobject_cleanup be staticGreg Kroah-Hartman2-7/+4
No one except the kobject core calls it so make the function static. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: fix up kobject_set_name to use kvasprintfGreg Kroah-Hartman1-39/+32
Kay pointed out that kobject_set_name was being very stupid, doing two allocations for every call, when it should just be using the kernel function kvasprintf() instead. This change adds the internal kobject_set_name_vargs() function, which other follow-on patches will be using. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert icom to use kref, not kobjectGreg Kroah-Hartman2-15/+11
The IBM icom serial driver is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard <anton@au.ibm.com> Cc: Paul Mackerras <paulus@au.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ryan S. Arnold <rsa@us.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert hvcs to use kref, not kobjectGreg Kroah-Hartman1-53/+25
hvcs is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard <anton@au.ibm.com> Cc: Paul Mackerras <paulus@au.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ryan S. Arnold <rsa@us.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert hvc_console to use kref, not kobjectGreg Kroah-Hartman1-47/+33
hvc_console is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Anton Blanchard <anton@au.ibm.com> Cc: Paul Mackerras <paulus@au.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ryan S. Arnold <rsa@us.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: convert ibmasm to use kref, not kobjectGreg Kroah-Hartman2-13/+9
The IBM asm driver is using a kobject only for reference counting, nothing else. So switch it to use a kref instead, which is all that is needed, and is much smaller. Cc: Max Asböck <amax@us.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24sysfs: remove SPIN_LOCK_UNLOCKEDJiri Slaby1-1/+1
SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Tejun Heo <teheo@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24sysfs: create optimal relative symlink targetsKay Sievers1-46/+42
Instead of walking from the source down to the root of sysfs, and back to the target, we stop at the first directory the source and the target share. This link: /devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/ep_81 pointed to: ../../../../../devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0/usb_endpoint/usbdev2.1_ep81 now it just points to: usb_endpoint/usbdev1.1_ep81 Thanks to Denis Cheng for bringing this up, and sending the initial patch. CC: Denis Cheng <crquan@gmail.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24driver core: Make the dev_*() family of macros in device.h completeEmil Medve3-21/+15
Removed duplicates defined elsewhere Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24ecryptfs: clean up attribute messGreg Kroah-Hartman1-67/+18
It isn't that hard to add simple kset attributes, so don't go through all the gyrations of creating your own object type and show and store functions. Just use the functions that are already present. This makes things much simpler. Note, the version_str string violates the "one value per file" rule for sysfs. I suggest changing this now (individual files per type supported is one suggested way.) Cc: Michael A. Halcrow <mahalcro@us.ibm.com> Cc: Michael C. Thompson <mcthomps@us.ibm.com> Cc: Tyler Hicks <tyhicks@ou.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24cosa: Convert from class_device to device for cosa sync driverTony Jones1-3/+2
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24tifm: Convert from class_device to device for TI flash mediaTony Jones3-15/+15
Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Alex Dubov <oakad@yahoo.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24pktcdvd: Convert from class_device to device for block/pktcdvdTony Jones2-10/+8
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Peter Osterlund <petero2@telia.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24paride: Convert from class_device to device for block/parideTony Jones2-9/+9
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Tim Waugh <tim@cyberelk.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24mtd: Convert from class_device to device for MTD/mtdcharTony Jones1-7/+5
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>