Re: [PATCH 4/6] usb: string: Use le16_to_cpu for langid

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

 



> > --- a/drivers/usb/core/usb.c
> > +++ b/drivers/usb/core/usb.c
> > @@ -925,7 +925,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
> >  			goto error;
> >  		} else {
> >  			dev->have_langid = -1;
> > -			dev->string_langid = tbuf[2] | (tbuf[3] << 8);
> > +			dev->string_langid = le16_to_cpu(*((__le16 *)&buf[2]));
> 
> You also changed from tbuf to buf. Is this intentional?
Good catch,

No this is not intentional it should still be `tbuf` here, `buf` name
must be used when applying patch number 6, here it will cause an error
as buf is a pointer the output string not the result of the usb request.

Jules

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux