RE: Strage code in ftdi_determine_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pete,

This should be cur_altsetting as it's the currently active alternate setting that we're interested in here.  In fact, elsewhere in the driver cur_altsetting is used, so for consistency I think it'd be desireable to change this to cur_altsetting.


Best regards,

Mark


 

-----Original Message-----
From: Pete Zaitcev [mailto:zaitcev@xxxxxxxxxx] 
Sent: 11 January 2010 07:58
To: greg@xxxxxxxxx
Cc: Mark Adamson; linux-usb@xxxxxxxxxxxxxxx
Subject: Strage code in ftdi_determine_type

Hello:

I noticed this piece of code by accident:

static void ftdi_determine_type(struct usb_serial_port *port) {
	......
		/* Determine interface code. */
		inter = serial->interface->altsetting->desc.bInterfaceNumber;
		if (inter == 0) {
			priv->interface = INTERFACE_A;

Is this supposed to be altsetting (in the instance, it's an equivalent of altsetting[0].desc) or cur_altsetting?

The driver had a lot of mileage on it as-is, so even if this is a bug, it does not bother anyone apparently. So... Should we do anything here?

-- Pete

--
This message has been scanned for viruses and dangerous content by Alchemist CleanFeed, and is believed to be clean.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux