* [1/2] USB: serial: ftdi_sio: fix gpio name collisions
@ 2018-09-30 12:27 Johan Hovold
0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2018-09-30 12:27 UTC (permalink / raw)
To: linux-usb
Cc: Karoly Pados, Loic Poulain, Linus Walleij, linux-gpio,
linux-kernel, Johan Hovold
Drop the gpio line names, which cause gpiolib to complain loudly
whenever a second ftdi gpiochip is registered:
gpio gpiochip5: Detected name collision for GPIO name 'CBUS0'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS1'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS2'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS3'
and also prevents the legacy sysfs interface from being used (as the
line names are used as device names whenever they are set):
sysfs: cannot create duplicate filename '/class/gpio/CBUS0'
Until non-unique names are supported by gpiolib (without warnings and
stack dumps), let's leave the gpio lines unnamed.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/ftdi_sio.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 6b727ada20cf..be50b2a200aa 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1778,10 +1778,6 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
#ifdef CONFIG_GPIOLIB
-static const char * const ftdi_ftx_gpio_names[] = {
- "CBUS0", "CBUS1", "CBUS2", "CBUS3"
-};
-
static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
@@ -2032,7 +2028,6 @@ static int ftx_gpioconf_init(struct usb_serial_port *port)
/* FIXME: FT234XD alone has 1 GPIO, but how to recognize this IC? */
priv->gc.ngpio = 4;
- priv->gc.names = ftdi_ftx_gpio_names;
/* Determine which pins are configured for CBUS bitbanging */
priv->gpio_altfunc = 0xff;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-30 12:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-30 12:27 [1/2] USB: serial: ftdi_sio: fix gpio name collisions Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).