]> git.baikalelectronics.ru Git - kernel.git/commit
usb: make usb port a real device
authorLan Tianyu <tianyu.lan@intel.com>
Wed, 5 Sep 2012 05:44:31 +0000 (13:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2012 19:38:26 +0000 (12:38 -0700)
commit397a9ebe14b668fd1fb21833685d1915f52ec662
tree0c44a7a978a55f9645f266fc376ce296107a54fc
parent4251eea2205a6ee92e84f53fbdbc99bec1c66fc4
usb: make usb port a real device

This patch turns each USB port on a hub into a new struct device.  This
new device has the USB hub interface device as its parent.  The port
devices are stored in a new structure (usb_port), and an array of
usb_ports are dynamically allocated once we know how many ports the USB
hub has.

Move the port_owner variable out of usb_hub and into this new structure.

A new file will be created in the hub interface sysfs directory, so
add documentation.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-bus-usb
drivers/usb/core/hub.c