sc16is7xx: Set iobase to device index
authorDaniel Mack <daniel@zonque.org>
Tue, 1 Sep 2020 12:03:29 +0000 (14:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Sep 2020 15:14:47 +0000 (17:14 +0200)
commit5da6b1c079e6804a81e63ab8337224cbd2148c91
tree4151586baf6dff1d07dab026d1a15e95ebfdbc18
parent89c65d664832ebaf2cbdcfe83b25c0036780feb7
sc16is7xx: Set iobase to device index

Some derivates of sc16is7xx devices expose more than one tty device to
userspace. If multiple such devices exist in a system, userspace
currently has no clean way to infer which tty maps to which physical
line.

Set the .iobase value to the relative index within the device to allow
infering the order through sysfs.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20200901120329.4176302-1-daniel@zonque.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c