mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
448016e326
commit
73de1ddaf4
|
|
@ -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);
|
||||
if (udev->product &&
|
||||
(!strcmp(udev->product, "Arrow USB Blaster") ||
|
||||
!strcmp(udev->product, "BeagleBone/XDS100V2") ||
|
||||
!strcmp(udev->product, "SNAP Connect E10")))
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user