diff options
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/sdla.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index b39a541b2509..05df0a345b60 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c | |||
@@ -1342,11 +1342,11 @@ static int sdla_set_config(struct net_device *dev, struct ifmap *map) | |||
1342 | if (flp->initialized) | 1342 | if (flp->initialized) |
1343 | return(-EINVAL); | 1343 | return(-EINVAL); |
1344 | 1344 | ||
1345 | for(i=0;i < sizeof(valid_port) / sizeof (int) ; i++) | 1345 | for(i=0; i < ARRAY_SIZE(valid_port); i++) |
1346 | if (valid_port[i] == map->base_addr) | 1346 | if (valid_port[i] == map->base_addr) |
1347 | break; | 1347 | break; |
1348 | 1348 | ||
1349 | if (i == sizeof(valid_port) / sizeof(int)) | 1349 | if (i == ARRAY_SIZE(valid_port)) |
1350 | return(-EINVAL); | 1350 | return(-EINVAL); |
1351 | 1351 | ||
1352 | if (!request_region(map->base_addr, SDLA_IO_EXTENTS, dev->name)){ | 1352 | if (!request_region(map->base_addr, SDLA_IO_EXTENTS, dev->name)){ |
@@ -1487,12 +1487,12 @@ got_type: | |||
1487 | } | 1487 | } |
1488 | } | 1488 | } |
1489 | 1489 | ||
1490 | for(i=0;i < sizeof(valid_mem) / sizeof (int) ; i++) | 1490 | for(i=0; i < ARRAY_SIZE(valid_mem); i++) |
1491 | if (valid_mem[i] == map->mem_start) | 1491 | if (valid_mem[i] == map->mem_start) |
1492 | break; | 1492 | break; |
1493 | 1493 | ||
1494 | err = -EINVAL; | 1494 | err = -EINVAL; |
1495 | if (i == sizeof(valid_mem) / sizeof(int)) | 1495 | if (i == ARRAY_SIZE(valid_mem)) |
1496 | goto fail2; | 1496 | goto fail2; |
1497 | 1497 | ||
1498 | if (flp->type == SDLA_S502A && (map->mem_start & 0xF000) >> 12 == 0x0E) | 1498 | if (flp->type == SDLA_S502A && (map->mem_start & 0xF000) >> 12 == 0x0E) |