aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/wbsd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index c7eb7c269081..9df0ddeb3ff9 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -1456,13 +1456,11 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
1456 * Iterate through all ports, all codes to 1456 * Iterate through all ports, all codes to
1457 * find hardware that is in our known list. 1457 * find hardware that is in our known list.
1458 */ 1458 */
1459 for (i = 0;i < sizeof(config_ports)/sizeof(int);i++) 1459 for (i = 0; i < ARRAY_SIZE(config_ports); i++) {
1460 {
1461 if (!request_region(config_ports[i], 2, DRIVER_NAME)) 1460 if (!request_region(config_ports[i], 2, DRIVER_NAME))
1462 continue; 1461 continue;
1463 1462
1464 for (j = 0;j < sizeof(unlock_codes)/sizeof(int);j++) 1463 for (j = 0; j < ARRAY_SIZE(unlock_codes); j++) {
1465 {
1466 id = 0xFFFF; 1464 id = 0xFFFF;
1467 1465
1468 host->config = config_ports[i]; 1466 host->config = config_ports[i];
@@ -1478,8 +1476,7 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
1478 1476
1479 wbsd_lock_config(host); 1477 wbsd_lock_config(host);
1480 1478
1481 for (k = 0;k < sizeof(valid_ids)/sizeof(int);k++) 1479 for (k = 0; k < ARRAY_SIZE(valid_ids); k++) {
1482 {
1483 if (id == valid_ids[k]) 1480 if (id == valid_ids[k])
1484 { 1481 {
1485 host->chip_id = id; 1482 host->chip_id = id;