On Fri, 23 Apr 2004, Greg KH wrote:

> On Thu, Apr 22, 2004 at 04:29:14PM -0400, Alan Stern wrote:
> > --- 1.22/drivers/usb/misc/uss720.c  Thu Mar  4 11:57:51 2004
> > +++ edited/drivers/usb/misc/uss720.c        Thu Apr 22 16:08:37 2004
> > @@ -553,7 +553,7 @@
> >     i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
> >     printk(KERN_DEBUG "uss720: set inteface result %d\n", i);
> >  
> > -   interface = &intf->altsetting[2];
> > +   interface = intf->cur_altsetting;
> 
> This was ok?  Hm, alright...

I'm not quite sure what you mean.  If "This" refers to uss720.c overall
then yes, that line was the only thing I could find that needed to be
changed.

If "This" refers to the new code, well, I can't test it to be sure but it 
looks okay.  Since the interface was just set to altsetting 2, 
cur_altsetting should point to the desired structure (which might not be 
at index 2 in the altsetting array).

If "This" refers to the error handling at that point, then no, it's not
really okay.  Printing a debug message with the result of the
usb_set_interface() doesn't really seem sufficient; the driver should do
something if an error occurs.  But that's the way the code was and I
wasn't sure what it ought to do, so I just left it alone.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to