• D
    usb: rename usb_port device objects · d99f6b41
    Dan Williams 提交于
    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: NAlan Stern <stern@rowland.harvard.edu>
    Acked-by: NAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: NDan Williams <dan.j.williams@intel.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d99f6b41
hub.c 157.0 KB