summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-01-03 22:56:56 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-03 22:56:56 +0000
commit63648fb5c0173614064e329503cc75c907dcb1a1 (patch)
tree35bed8ecc7aefbc19fedac3447bce0f8a8bbf40b /drivers/mmc
parenta6f6c96b65d7f65a7a7bf5cbe874eda182a6b2cc (diff)
[MMC] wbsd: make use of ARRAY_SIZE() macro
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-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 c7eb7c26908..9df0ddeb3ff 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -1456,13 +1456,11 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
* Iterate through all ports, all codes to
* find hardware that is in our known list.
*/
- for (i = 0;i < sizeof(config_ports)/sizeof(int);i++)
- {
+ for (i = 0; i < ARRAY_SIZE(config_ports); i++) {
if (!request_region(config_ports[i], 2, DRIVER_NAME))
continue;
- for (j = 0;j < sizeof(unlock_codes)/sizeof(int);j++)
- {
+ for (j = 0; j < ARRAY_SIZE(unlock_codes); j++) {
id = 0xFFFF;
host->config = config_ports[i];
@@ -1478,8 +1476,7 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
wbsd_lock_config(host);
- for (k = 0;k < sizeof(valid_ids)/sizeof(int);k++)
- {
+ for (k = 0; k < ARRAY_SIZE(valid_ids); k++) {
if (id == valid_ids[k])
{
host->chip_id = id;