summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* PCI: remove foolish code from pci-driver.cGreg Kroah-Hartman2008-01-241-45/+5
| | | | | | | | | | | | The PCI bus should not be trying to declare its own attribute type. Especially as this code could never ever be called because the driver core overwrites the driver kobject type to be its own internal type. Delete all of this code as it was never being used and is not correct. Also update my copyright on the file while I'm touching things there. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: use proper call to driver_create_fileGreg Kroah-Hartman2008-01-241-2/+7
| | | | | | | | Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCMCIA: use proper call to driver_create_fileGreg Kroah-Hartman2008-01-241-2/+1
| | | | | | | | Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: use proper call to driver_create_fileGreg Kroah-Hartman2008-01-241-4/+4
| | | | | | | | Don't try to call the "raw" sysfs_create_file when we already have a helper function to do this kind of work for us. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: remove fields from struct bus_typeGreg Kroah-Hartman2008-01-246-60/+102
| | | | | | | | | | | | | | | struct bus_type is static everywhere in the kernel. This moves the kobject in the structure out of it, and a bunch of other private only to the driver core fields are now moved to a private structure. This lets us dynamically create the backing kobject properly and gives us the chance to be able to document to users exactly how to use the struct bus_type as there are no fields they can improperly access. Thanks to Kay for the build fixes on this patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: add way to get to bus device klistGreg Kroah-Hartman2008-01-242-4/+13
| | | | | | | | | | | | | | | This allows an easier way to get to the device klist associated with a struct bus_type (you have three to choose from...) This will make it easier to move these fields to be dynamic in a future patch. The only user of this is the PCI core which horribly abuses this interface to rearrange the order of the pci devices. This should be done using the existing bus device walking functions, but that's left for future patches. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: add way to get to bus ksetGreg Kroah-Hartman2008-01-242-1/+10
| | | | | | | | | | This allows an easier way to get to the kset associated with a struct bus_type (you have three to choose from...) This will make it easier to move these fields to be dynamic in a future patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: convert drivers/net/iseries_veth.c to use kobject_init/add_ng()Greg Kroah-Hartman2008-01-241-13/+6
| | | | | | | | | | This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kyle A. Lucke <klucke@us.ibm.com> Cc: David Gibson <dwg@au1.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: convert drivers/base/core.c to use kobject_init/add_ng()Greg Kroah-Hartman2008-01-241-5/+3
| | | | | | | | This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: convert drivers/base/class.c to use kobject_init/add_ng()Greg Kroah-Hartman2008-01-241-7/+3
| | | | | | | | This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/md/md.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-4/+6
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Neil Brown <neilb@suse.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-5/+5
| | | | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/net/ibmveth.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-4/+6
| | | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Dave Larson <larson1@us.ibm.com> Cc: Santiago Leon <santil@us.ibm.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/block/pktcdvd.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-4/+5
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Jens Axboe <axboe@kernel.dk> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/acpi/system.c to use kobject_create_and_addGreg Kroah-Hartman2008-01-241-7/+6
| | | | | | | | | | Stop using kobject_register for this static kobject, as it's overkill. This way is much simpler. Cc: Len Brown <len.brown@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/base/sys.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-10/+6
| | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/pci/hotplug/pci_hotplug_core.c to use ↵Greg Kroah-Hartman2008-01-241-7/+7
| | | | | | | | | | | | kobject_init_and_add Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/cpuidle/sysfs.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-8/+9
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Shaohua Li <shaohua.li@intel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/edac to use kobject_init_and_addGreg Kroah-Hartman2008-01-243-67/+29
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Acked-by: Doug Thompson <dougthompson@xmission.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/cpufreq/cpufreq.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-5/+3
| | | | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Dominik Brodowski <linux@brodo.de> Cc: Ashok Raj <ashok.raj@intel.com> Cc: Jacob Shin <jacob.shin@amd.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/firmware/efivars.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-3/+3
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Matt Domsch <Matt_Domsch@dell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/firmware/edd.c to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-5/+5
| | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Matt Domsch <Matt_Domsch@dell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Kobject: change drivers/infiniband to use kobject_init_and_addGreg Kroah-Hartman2008-01-241-26/+9
| | | | | | | | | | | | Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <mshefty@ichips.intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* UIO: fix kobject usageGreg Kroah-Hartman2008-01-241-43/+48
| | | | | | | | | | | | | The uio kobject code is "wierd". This patch should hopefully fix it up to be sane and not leak memory anymore. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: clean up device_shutdownGreg Kroah-Hartman2008-01-243-45/+19
| | | | | | | | | | | device_shutdown does not need to be in a separate file. Move it into the driver core file where it belongs. This also moves us one more step closer to making devices_kset static, now only the crazy sysdevs are keeping that from happening... Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* driver core: clean up shutdown.cGreg Kroah-Hartman2008-01-242-12/+0
| | | | | | | | | shutdown.c had some stuff it did not need, including a duplicate extern in the power.h file. This cleans up all of that. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobject: convert parisc/pdc_stable to use kobject_createGreg Kroah-Hartman2008-01-241-8/+8
| | | | | | | | | | | | Using a kset for this simple directory is an overkill. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Thibaut VARENE <varenet@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobject: convert efivars to use kobject_createGreg Kroah-Hartman2008-01-241-10/+8
| | | | | | | | | | Using a kset for this simple directory is an overkill. 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>
* kobject: clean up rpadlpar horrid sysfs abuseGreg Kroah-Hartman2008-01-241-69/+43
| | | | | | | | | | | | | | | | | rpadlpar pci hotplug driver was doing some pretty bad stuff with the sysfs files. This cleans up the logic to be sane and gets rid of the gratuitous kset that is not needed for a simple directory like this. Note, this patch is not even build tested, let alone run-time tested. Someone with access to this hardware and can test would be greatly appreciated. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: John Rose <johnrose@austin.ibm.com> Cc: Badari Pulavarty <pbadari@gmail.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobject: remove subsystem_(un)register functionsGreg Kroah-Hartman2008-01-242-5/+5
| | | | | | | | | 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>
* kset: remove decl_subsys macroGreg Kroah-Hartman2008-01-241-2/+9
| | | | | | | | | | | | 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>
* firmware: change firmware_kset to firmware_kobjGreg Kroah-Hartman2008-01-245-8/+8
| | | | | | | | | | | | 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>
* firmware: remove firmware_(un)register()Greg Kroah-Hartman2008-01-241-17/+2
| | | | | | | | | | These functions are no longer called or needed, so we can remove them. As I rewrote the whole firmware.c file, add my copyright. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobject: convert /sys/firmware/acpi/ to use kobject_createGreg Kroah-Hartman2008-01-242-6/+7
| | | | | | | | | | 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: Len Brown <lenb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kset: convert edd to use kset_createGreg Kroah-Hartman2008-01-241-7/+7
| | | | | | | | | Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kset: convert parisc/pdc_stable.c to use kset_createGreg Kroah-Hartman2008-01-241-17/+21
| | | | | | | | | | | | | | Dynamically create the kset instead of declaring it statically. This makes the kobject attributes now work properly that I broke in the previous patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Thibaut VARENE <varenet@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kobject: convert parisc/pdc_stable to kobj_attr interfaceGreg Kroah-Hartman2008-01-241-77/+70
| | | | | | | | | | | | | | | | This makes the code a bit simpler and and gets us one step closer to deleting the deprecated subsys_attr code. NOTE, this needs the next patch in the series in order to work properly. This will build, but the sysfs files will not properly operate. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Thibaut VARENE <varenet@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kset: convert efivars to use kset_create for the vars sub-subsystem.Greg Kroah-Hartman2008-01-241-12/+10
| | | | | | | | | | Dynamically create the kset instead of declaring it statically. 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>
* kset: convert efivars to use kset_create for the efi subsystem.Greg Kroah-Hartman2008-01-241-10/+9
| | | | | | | | | | Dynamically create the kset instead of declaring it statically. 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>
* firmware: export firmware_kset so that people can use that instead of the ↵Greg Kroah-Hartman2008-01-241-1/+2
| | | | | | | | | | | | | | | 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>
* kobject: convert efivars to kobj_attr interfaceGreg Kroah-Hartman2008-01-241-21/+14
| | | | | | | | | | | This cleans up a lot of code and gets rid of a unneeded macro, and gets us one step closer to deleting the deprecated subsys_attr code. 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>
* efivars: make new_var and del_var binary sysfs filesGreg Kroah-Hartman2008-01-241-28/+23
| | | | | | | | | | | These files should not be "normal" sysfs files as they really are binary ones. This patch makes them binary files and saves code in doing so. Cc: Kay Sievers <kay.sievers@vrfy.org> Tested-by: Matt Domsch <Matt_Domsch@dell.com> Cc: Matt Tolentino <matthew.e.tolentino@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kset: convert struct bus_device->drivers to use kset_createGreg Kroah-Hartman2008-01-242-8/+9
| | | | | | | | | | | | | 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>
* kset: convert struct bus_device->devices to use kset_createGreg Kroah-Hartman2008-01-241-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>
* kset: convert /sys/devices/system to use kset_createGreg Kroah-Hartman2008-01-241-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>
* kobject: convert /sys/hypervisor to use kobject_createGreg Kroah-Hartman2008-01-241-4/+8
| | | | | | | | | | | | 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>
* kset: convert /sys/devices to use kset_createGreg Kroah-Hartman2008-01-244-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>
* kset: convert drivers/base/firmware.c to use kset_createGreg Kroah-Hartman2008-01-241-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>
* kset: convert drivers/base/class.c to use kset_createGreg Kroah-Hartman2008-01-241-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>
* kset: convert drivers/base/bus.c to use kset_createGreg Kroah-Hartman2008-01-241-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>