usb: rename usb_port device objects
authorDan Williams <dan.j.williams@intel.com>
Wed, 21 May 2014 01:08:17 +0000 (18:08 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 04:13:29 +0000 (13:13 +0900)
commita901de2d344a96b5056428621c21e7763d3deb29
tree76f0fdafe88a5ea7d3d205003b7cbf2a4598171a
parent2862caa8ce45d9da058be5186d0fde1c1e7f1807
usb: rename usb_port device objects

The current port name "portX" is ambiguous.  Before adding more port
messages rename ports to "<hub-device-name>-portX"

This is an ABI change, but the suspicion is that it will go unnoticed as
the port power control implementation has been broken since its
introduction.  If however, someone was relying on the old name we can
add sysfs links from the old name to the new name.

Additionally, it unifies/simplifies port dev_printk messages and modifies
instances of:
dev_XXX(hub->intfdev, ..."port %d"...
dev_XXX(&hdev->dev, ..."port%d"...
into:
dev_XXX(&port_dev->dev, ...

Now that the names are unique usb_port devices it would be nice if they
could be included in /sys/bus/usb.  However, it turns out that this
breaks 'lsusb -t'.  For now, create a dummy port driver so that print
messages are prefixed "usb 1-1-port3" rather than the
subsystem-ambiguous " 1-1-port3".

Finally, it corrects an odd usage of sscanf("port%d") in usb-acpi.c.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d99f6b41308779244662109a9c2bad09a82e8ac6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/usb/core/hub.c
drivers/usb/core/port.c
drivers/usb/core/usb-acpi.c
drivers/usb/core/usb.h