Commit 73de1dda authored by Johan Hovold's avatar Johan Hovold
Browse files

USB: serial: ftdi_sio: rewrite 8u2232c quirk



Rewrite the 8u2232c quirk to avoid the manufacturer and product string
comparisons for the second port which will always be bound.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 448016e3
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -2302,16 +2302,21 @@ static int ftdi_jtag_probe(struct usb_serial *serial)

static int ftdi_8u2232c_probe(struct usb_serial *serial)
{
	struct usb_interface *intf = serial->interface;
	struct usb_device *udev = serial->dev;
	int ifnum = intf->cur_altsetting->desc.bInterfaceNumber;

	if (udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems"))
		return ftdi_jtag_probe(serial);
	if (ifnum == 0) {
		if (udev->manufacturer &&
				!strcmp(udev->manufacturer, "CALAO Systems"))
			return -ENODEV;

		if (udev->product &&
				(!strcmp(udev->product, "Arrow USB Blaster") ||
				 !strcmp(udev->product, "BeagleBone/XDS100V2") ||
				 !strcmp(udev->product, "SNAP Connect E10")))
		return ftdi_jtag_probe(serial);
			return -ENODEV;
	}

	return 0;
}