summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-02-18 01:02:11 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2007-02-18 17:45:05 +0100
commit2a7295b277539728a748fba00db388f3dc49c0d0 (patch)
tree3285b0d19c0ab743656e7aa42ded9db21b8af0ab /drivers/mtd
parent[JFFS2] printk warning fixes (diff)
downloadlinux-2a7295b277539728a748fba00db388f3dc49c0d0.tar.xz
linux-2a7295b277539728a748fba00db388f3dc49c0d0.zip
[MTD] [NAND] Work around false compiler warning in CAFÉ driver
drivers/mtd/nand/cafe.c: In function 'cafe_nand_cmdfunc': drivers/mtd/nand/cafe.c:269: warning: 'irqs' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/cafe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index 1e877cbe7757..5ec82beb49df 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -265,10 +265,10 @@ static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
ndelay(100);
if (1) {
- int c = 500000;
+ int c;
uint32_t irqs;
- while (c--) {
+ for (c = 500000; c != 0; c--) {
irqs = cafe_readl(cafe, NAND_IRQ);
if (irqs & doneint)
break;