linux/drivers/usb/core
Kay Sievers 9f8b17e643 USB: make usbdevices export their device nodes instead of using a separate class
o The "real" usb-devices export now a device node which can
  populate /dev/bus/usb.

o The usb_device class is optional now and can be disabled in the
  kernel config. Major/minor of the "real" devices and class devices
  are the same.

o The environment of the usb-device event contains DEVNUM and BUSNUM to
  help udev and get rid of the ugly udev rule we need for the class
  devices.

o The usb-devices and usb-interfaces share the same bus, so I used
  the new "struct device_type" to let these devices identify
  themselves. This also removes the current logic of using a magic
  platform-pointer.
  The name of the device_type is also added to the environment
  which makes it easier to distinguish the different kinds of devices
  on the same subsystem.

  It looks like this:
    add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    SUBSYSTEM=usb
    SEQNUM=1533
    MAJOR=189
    MINOR=131
    DEVTYPE=usb_device
    PRODUCT=46d/c03e/2000
    TYPE=0/0/0
    BUSNUM=002
    DEVNUM=004

This udev rule works as a replacement for usb_device class devices:
  SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"

Updated patch, which needs the device_type patches in Greg's tree.

I also got a bugzilla assigned for this. :)
  https://bugzilla.novell.com/show_bug.cgi?id=250659


Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:37 -07:00
..
buffer.c USB: a bit more coding style cleanup 2007-02-07 15:44:40 -08:00
config.c usb: deal with broken config descriptors 2006-09-27 11:58:55 -07:00
devices.c USB: remove use of the bus rwsem, as it doesn't really protect anything. 2007-04-27 10:57:30 -07:00
devio.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
driver.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
endpoint.c USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR 2007-02-16 15:32:17 -08:00
file.c USB: convert usb class devices to real devices 2007-02-07 15:44:31 -08:00
generic.c USB: unconfigure devices which have config 0 2007-02-16 15:32:21 -08:00
hcd-pci.c USB: Properly unregister reboot notifier in case of failure in ehci hcd 2006-09-27 11:58:54 -07:00
hcd.c USB: separate autosuspend from external suspend 2007-04-27 13:28:35 -07:00
hcd.h USB: separate autosuspend from external suspend 2007-04-27 13:28:35 -07:00
hub.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
hub.h USB: Move private hub declarations out of public header file 2006-12-01 14:23:30 -08:00
inode.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
Kconfig USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
Makefile USB: add a blacklist for devices that can't handle some things we throw at them. 2007-02-23 15:03:46 -08:00
message.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
notify.c usbfs: private mutex for open, release, and remove 2006-09-27 11:58:49 -07:00
otg_whitelist.h USB: Fix apparent typo CONFIG_USB_CDCETHER. 2007-02-16 15:32:18 -08:00
quirks.c USB: add power/level sysfs attribute 2007-04-27 13:28:37 -07:00
sysfs.c USB: add power/level sysfs attribute 2007-04-27 13:28:37 -07:00
urb.c usbcore: trivial whitespace fixes 2007-02-07 15:44:40 -08:00
usb.c USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00
usb.h USB: make usbdevices export their device nodes instead of using a separate class 2007-04-27 13:28:37 -07:00