summaryrefslogtreecommitdiffstats
path: root/common/usb_storage.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-04-09 21:42:18 +0200
committerWolfgang Denk <wd@denx.de>2010-04-09 21:42:18 +0200
commit2aa4c57a101c0432e110561f5439560faf4e8018 (patch)
tree571815a2bbd914d1588b12140c8502022942af41 /common/usb_storage.c
parent760bce07f182f678d42f2a85a0e47b59e831ba25 (diff)
parentfac71cc49f93db7d460dbc957dfbbadefa2ca0e9 (diff)
downloadblackbird-obmc-uboot-2aa4c57a101c0432e110561f5439560faf4e8018.tar.gz
blackbird-obmc-uboot-2aa4c57a101c0432e110561f5439560faf4e8018.zip
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r--common/usb_storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index a8642c9cc5..4fc01a22b4 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -175,7 +175,7 @@ void uhci_show_temp_int_td(void);
block_dev_desc_t *usb_stor_get_dev(int index)
{
- return (index < USB_MAX_STOR_DEV) ? &usb_dev_desc[index] : NULL;
+ return (index < usb_max_devs) ? &usb_dev_desc[index] : NULL;
}
@@ -244,7 +244,7 @@ int usb_stor_scan(int mode)
* get info and fill it in
*/
if (usb_stor_get_info(dev, &usb_stor[usb_max_devs],
- &usb_dev_desc[usb_max_devs]))
+ &usb_dev_desc[usb_max_devs]) == 1)
usb_max_devs++;
}
/* if storage device */
@@ -888,7 +888,7 @@ static int usb_inquiry(ccb *srb, struct us_data *ss)
USB_STOR_PRINTF("inquiry returns %d\n", i);
if (i == 0)
break;
- } while (retry--);
+ } while (--retry);
if (!retry) {
printf("error in inquiry\n");
OpenPOWER on IntegriCloud