<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/bus.c, branch v2.6.23.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/base/bus.c?h=v2.6.23.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/base/bus.c?h=v2.6.23.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2007-07-11T23:09:06Z</updated>
<entry>
<title>sysfs: kill unnecessary attribute-&gt;owner</title>
<updated>2007-07-11T23:09:06Z</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-06-13T18:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b595756ec1f49e0049a9e01a1298d53a7faaa15'/>
<id>urn:sha1:7b595756ec1f49e0049a9e01a1298d53a7faaa15</id>
<content type='text'>
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-&gt;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: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: coding style cleanup</title>
<updated>2007-07-11T23:09:02Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2007-07-09T18:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dc0afa8388972a9ed7c2203cc46d8df1a4713f65'/>
<id>urn:sha1:dc0afa8388972a9ed7c2203cc46d8df1a4713f65</id>
<content type='text'>
This converts code of the form

	if ((error = some_func()))
		goto fixup;
to
	error = some_func();
	if (error)
		goto fixup;

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: add missing kset uevent</title>
<updated>2007-07-11T23:09:01Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2007-05-26T09:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=80f03e349f06a261a8e980bf6005c61811a0d66a'/>
<id>urn:sha1:80f03e349f06a261a8e980bf6005c61811a0d66a</id>
<content type='text'>
We get uevents for a bus/class going away, but not one registering.
Add the missing uevent in kset_register(), which will send an
event for a new bus/class. Suppress all unwanted uevents for bus
subdirectories like /bus/*/devices/, /bus/*/drivers/.

Now we get for module usbcore:
  add      /module/usbcore (module)
  add      /bus/usb (bus)
  add      /class/usb_host (class)
  add      /bus/usb/drivers/hub (drivers)
  add      /bus/usb/drivers/usb (drivers)
  remove   /bus/usb/drivers/usb (drivers)
  remove   /bus/usb/drivers/hub (drivers)
  remove   /class/usb_host (class)
  remove   /bus/usb (bus)
  remove   /module/usbcore (module)

instead of:
  add      /module/usbcore (module)
  add      /bus/usb/drivers/hub (drivers)
  add      /bus/usb/drivers/usb (drivers)
  remove   /bus/usb/drivers/usb (drivers)
  remove   /bus/usb/drivers/hub (drivers)
  remove   /class/usb_host (class)
  remove   /bus/usb/drivers (bus)
  remove   /bus/usb/devices (bus)
  remove   /bus/usb (bus)
  remove   /module/usbcore (module)

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>remove "struct subsystem" as it is no longer needed</title>
<updated>2007-05-03T01:57:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2007-04-13T20:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=823bccfc4002296ba88c3ad0f049e1abd8108d30'/>
<id>urn:sha1:823bccfc4002296ba88c3ad0f049e1abd8108d30</id>
<content type='text'>
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 &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: bus_add_driver should return an error if no bus</title>
<updated>2007-04-27T17:57:32Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2007-04-20T18:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f6e1945fecad6ac8134e9fa68b7708e55690e9e'/>
<id>urn:sha1:4f6e1945fecad6ac8134e9fa68b7708e55690e9e</id>
<content type='text'>
As pointed out by Dave Jones.

Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: remove unneeded completion from driver release path</title>
<updated>2007-04-27T17:57:29Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2002-04-09T19:14:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=74e9f5fa1570f956c96dd5d3f1053daedbbf01a0'/>
<id>urn:sha1:74e9f5fa1570f956c96dd5d3f1053daedbbf01a0</id>
<content type='text'>
The completion in the driver release path is due to ancient history in
the _very_ early 2.5 days when we were not tracking the module reference
count of attributes.  It is not needed at all and can be removed.

Note, we now have an empty release function for the driver structure.
This is due to the fact that drivers are statically allocated in the
system at this point in time, something which I want to change in the
future.  But remember, drivers are really code, which is reference
counted by the module, unlike devices, which are data and _must_ be
reference counted properly in order to work correctly.


Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>driver core: don't fail attaching the device if it cannot be bound</title>
<updated>2007-04-27T17:57:29Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2007-02-06T00:15:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c6a46696f97ff260a4ecce5e287f8de4b9d7fe14'/>
<id>urn:sha1:c6a46696f97ff260a4ecce5e287f8de4b9d7fe14</id>
<content type='text'>
Don't fail bus_attach_device() if the device cannot be bound.

If dev-&gt;driver has been specified, reset it to NULL if device_bind_driver()
failed and add the device as an unbound device.  As a result,
bus_attach_device() now cannot fail, and we can remove some checking from
device_add().

Also remove an unneeded check in bus_rescan_devices_helper().

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: udev triggered device-&lt;&gt;driver binding</title>
<updated>2007-04-27T17:57:28Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2007-02-16T16:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b8c5cec23d5c33b767a1cddebd4f8813a9563e3c'/>
<id>urn:sha1:b8c5cec23d5c33b767a1cddebd4f8813a9563e3c</id>
<content type='text'>
We get two per-bus sysfs files:
  ls-l /sys/subsystem/usb
  drwxr-xr-x 2 root root    0 2007-02-16 16:42 devices
  drwxr-xr-x 7 root root    0 2007-02-16 14:55 drivers
  -rw-r--r-- 1 root root 4096 2007-02-16 16:42 drivers_autoprobe
  --w------- 1 root root 4096 2007-02-16 16:42 drivers_probe

The flag "drivers_autoprobe" controls the behavior of the bus to bind
devices by default, or just initialize the device and leave it alone.

The command "drivers_probe" accepts a bus_id and the bus tries to bind a
driver to this device.

Systems who want to control the driver binding with udev, switch off the
bus initiated probing:
  echo 0 &gt; /sys/subsystem/usb/drivers_autoprobe
  echo 0 &gt; /sys/subsystem/pcmcia/drivers_autoprobe
  ...

and initiate the probing with udev rules like:
  ACTION=="add", SUBSYSTEM=="usb", ATTR{subsystem/drivers_probe}="$kernel"
  ACTION=="add", SUBSYSTEM=="pcmcia", ATTR{subsystem/drivers_probe}="$kernel"
  ...

Custom driver binding can happen in earlier rules by something like:
  ACTION=="add", SUBSYSTEM=="usb", \
  ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678" \
  ATTR{subsystem/drivers/&lt;custom-driver&gt;/bind}="$kernel"

This is intended to solve the modprobe.conf mess with "install-rules", custom
bind/unbind-scripts and all the weird things people invented over the years.
It should also provide the functionality "libusual" was supposed to do.

With udev, one can just write a udev rule to drive all USB-disks at the
third port of USB-hub by the "ub" driver, and everything else by
usb-storage. One can also instruct udev to bind different wireless
drivers to identical cards - just selected by the pcmcia slot-number, and
whatever ...

To use the mentioned rules, it needs udev version 106, to be able to
write ATTR{}="$kernel" to sysfs files.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Driver core: device_add_attrs() cleanup</title>
<updated>2007-02-16T23:19:18Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2007-02-14T06:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4aca67e5f54bf6ee439b5bdbc77007a547ad5b43'/>
<id>urn:sha1:4aca67e5f54bf6ee439b5bdbc77007a547ad5b43</id>
<content type='text'>
Clean up the coding in device_add_attrs() a bit.

Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>CONFIG_SYSFS_DEPRECATED - bus symlinks</title>
<updated>2006-12-01T22:51:58Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2006-09-14T09:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9cafc7d5b8af0c71896f60dfcff40c71bd38a9a'/>
<id>urn:sha1:b9cafc7d5b8af0c71896f60dfcff40c71bd38a9a</id>
<content type='text'>
Turn off the bus symlinks if CONFIG_SYSFS_DEPRECATED is enabled

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
