- 13 10月, 2007 1 次提交
-
-
由 Kay Sievers 提交于
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: NKay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 12 7月, 2007 2 次提交
-
-
由 Tejun Heo 提交于
devt_attr and uevent_attr are either allocated dynamically with or embedded in device and class_device as they needed their owner field set to the module implementing the driver. Now that sysfs implements immediate disconnect and owner field removed from struct attribute, there is no reason to do this. Remove these attributes from [class_]device and use static attribute structures instead. Signed-off-by: NTejun Heo <htejun@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Tejun Heo 提交于
sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: NTejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 09 6月, 2007 1 次提交
-
-
由 Kay Sievers 提交于
Class-devices created by "struct class_device" are going to be replaced by "struct device". Keep the deprecated PHYSDEV* variables for the already "deprecated" struct class_device" devices. Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 03 5月, 2007 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
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: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 28 4月, 2007 1 次提交
-
-
由 Kay Sievers 提交于
- 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: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 24 2月, 2007 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
No one uses it, and it wasn't exported to modules, so remove it. The only other user of it was the network code, which is now converted to use struct device instead. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 2月, 2007 1 次提交
-
-
由 Mariusz Kozlowski 提交于
Here is a patch that removes all redundant kobject_unregister argument checks. Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 08 2月, 2007 1 次提交
-
-
由 Cornelia Huck 提交于
Make make_class_name() return NULL on error and fixup callers in the driver core. Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 14 12月, 2006 1 次提交
-
-
由 Akinobu Mita 提交于
Class virtual directory is created as the need arises. But it is not deleted when the class is unregistered. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 02 12月, 2006 2 次提交
-
-
由 Kay Sievers 提交于
Turn off class symlinks CONFIG_SYSFS_DEPRECATED is enabled. Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
It doesn't need to be global or in device.h Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 19 10月, 2006 1 次提交
-
-
由 Cornelia Huck 提交于
Check for return value of sysfs_create_link() in class_device_add(). Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 30 9月, 2006 1 次提交
-
-
由 Rolf Eike Beer 提交于
Change parameter names to match arguments of functions. Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de> Cc: Martin Waitz <tali@admingilde.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 26 9月, 2006 5 次提交
-
-
由 Greg Kroah-Hartman 提交于
When moving class_device usage over to device, we need to handle class_interfaces properly with devices. This patch adds that support. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This change creates a devices/virtual/CLASS_NAME tree for struct devices that belong to a class, yet do not have a "real" struct device for a parent. It automatically creates the directories on the fly as needed. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Miguel Ojeda Sandonis 提交于
Adds const to class_create second parameter, because: struct class { const char * name; /*...*/ } Signed-off-by: NMiguel Ojeda Sandonis <maxextreme@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Dmitry Torokhov 提交于
Signed-off-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Kay Sievers 提交于
deprecate PHYSDEV* values in the uevent environment These values are no longer needed and inconsistent with the stacking of class devices. The event environment should not carry properties of a parent device. The key PHYSDEVDRIVER is available as DRIVER, PHYDEVBUS is indentical SUBSYSTEM. Class devices should not carry any of these values. Signed-off-by: NKay Sievers <kay.sievers@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 01 7月, 2006 1 次提交
-
-
由 Jörn Engel 提交于
Signed-off-by: NJörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: NAdrian Bunk <bunk@stusta.de>
-
- 22 6月, 2006 5 次提交
-
-
由 Kay Sievers 提交于
Like the SUBSYTEM= key we find in the environment of the uevent, this creates a generic "subsystem" link in sysfs for every device. Userspace usually doesn't care at all if its a "class" or a "bus" device. This provides an unified way to determine the subsytem of a device, regardless of the way the driver core has created it. Signed-off-by: NKay Sievers <kay.sievers@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This is the first step in moving class_device to being replaced by struct device. It allows struct device to export a dev_t and makes it easy to dynamically create and destroy struct device as long as they are associated with a specific class. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This is needed for a future patch for the device code to create the proper symlinks for devices that are "class devices". Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
Cc: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Stephen Hemminger 提交于
class_device_add needs to check the return value of all the setup it does. It doesn't handle out of memory well. This is not complete, probably more needs to be done. Signed-off-by: NStephen Hemminger <shemminger@osdl.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 07 5月, 2006 1 次提交
-
-
由 Stephen Hemminger 提交于
Extend the support of attribute groups in class_device's to allow groups to be created as part of the registration process. This allows network device's to avoid race between registration and creating groups. Note that unlike attributes that are a property of the class object, the groups are a property of the class_device object. This is done because there are different types of network devices (wireless for example). Signed-off-by: NStephen Hemminger <shemminger@osdl.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 4月, 2006 1 次提交
-
-
由 Jayachandran C 提交于
This patch tries to fix an issue in drivers/base/class.c, please review and apply if correct. Patch Description: "parent_class" is checked for NULL already, so removed the unnecessary check. Signed-off-by: NJayachandran C. <c.jayachandran@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 05 1月, 2006 1 次提交
-
-
由 Kay Sievers 提交于
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: NKay Sievers <kay.sievers@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 31 10月, 2005 1 次提交
-
-
由 Tim Schmielau 提交于
I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 29 10月, 2005 4 次提交
-
-
由 Greg Kroah-Hartman 提交于
This patch allows struct class_device to be nested, so that another struct class_device can be the parent of a new one, instead of only having the struct class be the parent. This will allow us to (hopefully) fix up the input and video class subsystem mess. But please people, don't go crazy and start making huge trees of class devices, you should only need 2 levels deep to get everything to work (remember to use a class_interface to get notification of a new class device being added to the system.) Oh, this also allows us to have the possibility of potentially, someday, moving /sys/block into /sys/class. The main hindrance is that pesky /dev numberspace issue... Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Kay Sievers 提交于
A "coldplug + udevstart" can be simple like this: for i in /sys/block/*/*/uevent; do echo 1 > $i; done for i in /sys/class/*/*/uevent; do echo 1 > $i; done for i in /sys/bus/*/devices/*/uevent; do echo 1 > $i; done Signed-off-by: NKay Sievers <kay.sievers@suse.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Dmitry Torokhov 提交于
Driver core: pass interface to class intreface methods Pass interface as argument to add() and remove() class interface methods. This way a subsystem can implement generic add/remove handlers and then call interface-specific ones. Signed-off-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Dmitry Torokhov 提交于
Move call to kobject_hotplug() above code that adds interfaces to a class device, otherwise children's hotplug events may reach userspace first. Signed-off-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 22 9月, 2005 1 次提交
-
-
由 Bill Nottingham 提交于
The class symlinks in sysfs don't properly handle changing device names. To demonstrate, rename your network device from eth0 to eth1. Your pci (or usb, or whatever) device will still have a 'net:eth0' link, except now it points to /sys/class/net/eth1. The attached patch makes sure the class symlink name changes when the class device name changes. It isn't 100% correct, it should be using sysfs_rename_link. Unfortunately, sysfs_rename_link doesn't exist. Signed-off-by: NBill Nottingham <notting@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 13 9月, 2005 1 次提交
-
-
由 Jiri Slaby 提交于
Fixes a bunch of memset bugs too. Signed-off-by: NLion Vollnhals <webmaster@schiggl.de> Signed-off-by: NJiri Slaby <xslaby@fi.muni.cz> Cc: Greg KH <greg@kroah.com> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 06 9月, 2005 2 次提交
-
-
由 Jesper Juhl 提交于
Remove needless checking of variable for NULL before calling kfree() on it. Applies to 2.6.13-rc6-git9 Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Dmitry Torokhov 提交于
Driver core: link device and all class devices derived from it. To ease the task of locating class devices derived from a certain device create symlinks from parent device to its class devices. Change USB host class device name from usbX to usb_hostX to avoid conflict when creating aforementioned links. Tweaked by Greg to have the symlink be "class_name:class_device_name" in order to prevent duplicate links. Signed-off-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 8月, 2005 1 次提交
-
-
由 Maneesh Soni 提交于
This moves the code to free devt_attr from class_device_del() to class_dev_release() which is called after the last reference to the corresponding kobject() is gone. This allows us to keep the devt_attr alive while the corresponding sysfs file is open. Signed-off-by: NManeesh Soni <maneesh@in.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 21 6月, 2005 2 次提交
-
-
由 gregkh@suse.de 提交于
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 gregkh@suse.de 提交于
One step on improving the class api so that it can not be used incorrectly. This also fixes the module owner issue with the dev files that happened when the devt logic moved to the class core. Based on a patch originally written by Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-