[PATCH][MTD][NAND]: fix omap2.c compile failure and warning
tom.leiming at gmail.com
tom.leiming at gmail.com
Fri Jun 26 09:21:49 EDT 2009
From: Ming Lei <tom.leiming at gmail.com>
drivers/mtd/nand/omap2.c: In function 'omap_wait':
drivers/mtd/nand/omap2.c:543: error: 'jiffies' undeclared (first use in this function)
drivers/mtd/nand/omap2.c:543: error: (Each undeclared identifier is reported only once
drivers/mtd/nand/omap2.c:543: error: for each function it appears in.)
drivers/mtd/nand/omap2.c:557: error: implicit declaration of function 'time_before'
......
drivers/mtd/nand/omap2.c: In function 'omap_wait':
drivers/mtd/nand/omap2.c:545: warning: 'status' may be used uninitialized in this function
Signed-off-by: Ming Lei <tom.leiming at gmail.com>
---
drivers/mtd/nand/omap2.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 0cd76f8..2905c79 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -15,6 +15,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/io.h>
+#include <linux/jiffies.h>
#include <asm/dma.h>
@@ -541,7 +542,8 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
mtd);
unsigned long timeo = jiffies;
- int status, state = this->state;
+ int state = this->state;
+ int status = 0;
if (state == FL_ERASING)
timeo += (HZ * 400) / 1000;
--
1.6.0.GIT
More information about the linux-mtd
mailing list