usb-serial: show port number in sysfs
authorRoman Kagan <rkagan@sw.ru>
Fri, 24 Aug 2007 16:22:52 +0000 (20:22 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:20 +0000 (14:55 -0700)
commitce0d9325b19555f05b08cbb1ea4c2393eec188ec
tree8e7da899788b3a5e0c266b94bd9c3549f9f5df9d
parentfdf99c9ec10cb9cd44be3ac0bd007a49ac6dc751
usb-serial: show port number in sysfs

Some usb-serial devices (e.g. certain Edgeport models) have more than
one serial port on the same USB device/interface.

Currently the only way to distinguish these ports in userspace is by
their minor device number: the driver makes them consecutive and in
stable order.

However, for the purpose of stable naming with udev this is
insufficient: when udev handles the ADD event for one of the ports it
doesn't know what minor number the other one has.

To make stable naming easier, export the port number via sysfs.

Signed-off-by: Roman Kagan <rkagan@sw.ru>
Signed-off-by: Dmitry Guryanov <dimak@dgap.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/bus.c