aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/xd.c')
-rw-r--r--drivers/block/xd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 97f5dab24b5a..cbce7c5e9445 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -279,11 +279,11 @@ static u_char __init xd_detect (u_char *controller, unsigned int *address)
279 return(1); 279 return(1);
280 } 280 }
281 281
282 for (i = 0; i < (sizeof(xd_bases) / sizeof(xd_bases[0])); i++) { 282 for (i = 0; i < ARRAY_SIZE(xd_bases); i++) {
283 void __iomem *p = ioremap(xd_bases[i], 0x2000); 283 void __iomem *p = ioremap(xd_bases[i], 0x2000);
284 if (!p) 284 if (!p)
285 continue; 285 continue;
286 for (j = 1; j < (sizeof(xd_sigs) / sizeof(xd_sigs[0])); j++) { 286 for (j = 1; j < ARRAY_SIZE(xd_sigs); j++) {
287 const char *s = xd_sigs[j].string; 287 const char *s = xd_sigs[j].string;
288 if (check_signature(p + xd_sigs[j].offset, s, strlen(s))) { 288 if (check_signature(p + xd_sigs[j].offset, s, strlen(s))) {
289 *controller = j; 289 *controller = j;
@@ -1018,7 +1018,7 @@ static void __init do_xd_setup (int *integers)
1018 case 2: if ((integers[2] > 0) && (integers[2] < 16)) 1018 case 2: if ((integers[2] > 0) && (integers[2] < 16))
1019 xd_irq = integers[2]; 1019 xd_irq = integers[2];
1020 case 1: xd_override = 1; 1020 case 1: xd_override = 1;
1021 if ((integers[1] >= 0) && (integers[1] < (sizeof(xd_sigs) / sizeof(xd_sigs[0])))) 1021 if ((integers[1] >= 0) && (integers[1] < ARRAY_SIZE(xd_sigs)))
1022 xd_type = integers[1]; 1022 xd_type = integers[1];
1023 case 0: break; 1023 case 0: break;
1024 default:printk("xd: too many parameters for xd\n"); 1024 default:printk("xd: too many parameters for xd\n");