uas: Streams are numbered 1-y, rather then 0-x
It is easier to simply make the arrays one larger, rather then substracting one everywhere. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
5eb6d9e3ef
commit
0478661ec5
|
@ -122,8 +122,8 @@ struct UASDevice {
|
||||||
UASRequest *dataout2;
|
UASRequest *dataout2;
|
||||||
|
|
||||||
/* usb 3.0 only */
|
/* usb 3.0 only */
|
||||||
USBPacket *data3[UAS_MAX_STREAMS];
|
USBPacket *data3[UAS_MAX_STREAMS + 1];
|
||||||
USBPacket *status3[UAS_MAX_STREAMS];
|
USBPacket *status3[UAS_MAX_STREAMS + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UASRequest {
|
struct UASRequest {
|
||||||
|
@ -666,7 +666,7 @@ static void usb_uas_cancel_io(USBDevice *dev, USBPacket *p)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (uas_using_streams(uas)) {
|
if (uas_using_streams(uas)) {
|
||||||
for (i = 0; i < UAS_MAX_STREAMS; i++) {
|
for (i = 0; i <= UAS_MAX_STREAMS; i++) {
|
||||||
if (uas->status3[i] == p) {
|
if (uas->status3[i] == p) {
|
||||||
uas->status3[i] = NULL;
|
uas->status3[i] = NULL;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue