Re: [RFC] ftdi_sio driver: use altsetting or cur_altsetting?

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

 



Hi Johan,

> As long as you only access bNumInterfaces, which by definition is
> identical for all altsettings, it's not wrong per se.

But the code in ftdi_determine_type() that uses the altsetting pointer
is not looking at bNumInterfaces, it is looking at bInterfaceNumber
instead:

  inter = serial->interface->altsetting->desc.bInterfaceNumber;

> Yes, please use that for new code.

OK, I will make a new version of my DUART28 patch with cur_altsetting
instead of altsetting.

> > Should I also make a patch to ftdi_determine_type() changing it to use
> > cur_altsetting as well?
>
> Sure; it's not needed for correctness, but let's do it for consistency.

OK, I will include that patch as well in the next version of my series.

M~



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

  Powered by Linux