diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-10 04:43:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:20 -0500 |
commit | 8447157a1ac467fae2125074f3693f557c8e05d3 (patch) | |
tree | 12a2fb9b351727bc28c7f2e29adcc97a849a5178 | |
parent | 047c7c42327433a13ed2971de41ef7c6943b37ec (diff) |
[PATCH] CRIS: user ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in linux/kernel.h
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/cris/arch-v10/drivers/axisflashmap.c | 3 | ||||
-rw-r--r-- | arch/cris/mm/tlb.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index ffade19a14e6..efd7b0f3a910 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c | |||
@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void) | |||
359 | * So we use the MTD concatenation layer instead of further | 359 | * So we use the MTD concatenation layer instead of further |
360 | * complicating the probing procedure. | 360 | * complicating the probing procedure. |
361 | */ | 361 | */ |
362 | mtd_cse = mtd_concat_create(mtds, | 362 | mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds), |
363 | sizeof(mtds) / sizeof(mtds[0]), | ||
364 | "cse0+cse1"); | 363 | "cse0+cse1"); |
365 | #else | 364 | #else |
366 | printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " | 365 | printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " |
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index 0df390a656cd..c4a98e2e529e 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | ||
11 | #include <asm/tlb.h> | 12 | #include <asm/tlb.h> |
12 | 13 | ||
13 | #define D(x) | 14 | #define D(x) |
@@ -100,7 +101,7 @@ tlb_init(void) | |||
100 | 101 | ||
101 | /* clear the page_id map */ | 102 | /* clear the page_id map */ |
102 | 103 | ||
103 | for (i = 1; i < sizeof (page_id_map) / sizeof (page_id_map[0]); i++) | 104 | for (i = 1; i < ARRAY_SIZE(page_id_map); i++) |
104 | page_id_map[i] = NULL; | 105 | page_id_map[i] = NULL; |
105 | 106 | ||
106 | /* invalidate the entire TLB */ | 107 | /* invalidate the entire TLB */ |