summaryrefslogtreecommitdiffstats
path: root/sys/dev/cardbus/cardbus_cis.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2000-11-30 19:14:26 +0000
committergibbs <gibbs@FreeBSD.org>2000-11-30 19:14:26 +0000
commit4577a7a206bbe5c28d07b0517c8b07b0ee1df2ed (patch)
treef84d4b9301a71808e8c6dec354f8d37c6efe05af /sys/dev/cardbus/cardbus_cis.c
parent40b5fc7a7cd7bd09a77ea02168792fc53253ccf4 (diff)
downloadFreeBSD-src-4577a7a206bbe5c28d07b0517c8b07b0ee1df2ed.zip
FreeBSD-src-4577a7a206bbe5c28d07b0517c8b07b0ee1df2ed.tar.gz
Remove an unused variable.
Properly advance to the next image while searching for the ROM image that contains CIS data. KNF an if statement.
Diffstat (limited to 'sys/dev/cardbus/cardbus_cis.c')
-rw-r--r--sys/dev/cardbus/cardbus_cis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index deef8cd..2845660 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -263,7 +263,7 @@ DECODE_PROTOTYPE(bar)
int type;
int reg;
u_int32_t bar;
- u_int32_t start, len;
+ u_int32_t len;
struct resource *res;
reg = *(u_int16_t*)tupledata;
@@ -359,7 +359,7 @@ cardbus_read_tuple_exrom(device_t dev, struct resource *mem, u_int32_t *start,
data = image + READROM(image, 16, CARDBUS_EXROM_DATA_PTR);
imagesize = READROM(data, 16, CARDBUS_EXROM_DATA_IMAGE_LENGTH);
- if(imagesize == 0) {
+ if (imagesize == 0) {
/*
* XXX some ROMs seem to have this as zero,
* can we assume this means 1 block?
@@ -376,7 +376,7 @@ cardbus_read_tuple_exrom(device_t dev, struct resource *mem, u_int32_t *start,
*off += *len+2;
return 0;
}
-
+ image += imagesize;
romnum++;
} while ((READROM(data, 8, CARDBUS_EXROM_DATA_INDICATOR) & 0x80) == 0);
device_printf(dev, "Cannot read CIS: Not enough images of rom\n");
OpenPOWER on IntegriCloud