diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-10-24 18:15:52 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-11-12 09:29:32 +0100 |
commit | adb2e9e2e56af800b75f181b031757b9cf578add (patch) | |
tree | 5363d726687e17ad187acc98a6ee1265bfc94008 | |
parent | cc41ae6609f163c4ada6f3e950649f88a9e6705f (diff) |
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>
-rw-r--r-- | hw/usb/dev-uas.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 12d79ef74..70f41d390 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -122,8 +122,8 @@ struct UASDevice { UASRequest *dataout2; /* usb 3.0 only */ - USBPacket *data3[UAS_MAX_STREAMS]; - USBPacket *status3[UAS_MAX_STREAMS]; + USBPacket *data3[UAS_MAX_STREAMS + 1]; + USBPacket *status3[UAS_MAX_STREAMS + 1]; }; struct UASRequest { @@ -666,7 +666,7 @@ static void usb_uas_cancel_io(USBDevice *dev, USBPacket *p) return; } 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) { uas->status3[i] = NULL; return; |