Commit 5d47c887 authored by Marc Zyngier's avatar Marc Zyngier Committed by Johan Hovold
Browse files

USB: serial: ftdi_sio: drop GPIO line checking dead code



Now that gpiolib can track the validity of GPIO pins, there is no need
to check whether the line is valid in request().

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201204164739.781812-5-maz@kernel.org


Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
[johan: amend commit message]
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 11fb08cf
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1841,9 +1841,6 @@ static int ftdi_gpio_request(struct gpio_chip *gc, unsigned int offset)
	struct ftdi_private *priv = usb_get_serial_port_data(port);
	int result;

	if (priv->gpio_altfunc & BIT(offset))
		return -ENODEV;

	mutex_lock(&priv->gpio_lock);
	if (!priv->gpio_used) {
		/* Set default pin states, as we cannot get them from device */