diff options
author | Koen Kooi <koen@openembedded.org> | 2009-07-30 12:56:01 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-07-30 12:56:01 +0200 |
commit | 48c0428ab395a901b93c452f323f5646b74e2266 (patch) | |
tree | d0d2dbfd7c7722655486f4d30be7274d8e8a47e0 /recipes/linux/linux-omap-pm/fix-mtd.diff | |
parent | f2e6ca6bfa79d166ee72224bbb95ca1a71125d43 (diff) |
linux-omap-pm git: fix mtd and tweak defconfig
Diffstat (limited to 'recipes/linux/linux-omap-pm/fix-mtd.diff')
-rw-r--r-- | recipes/linux/linux-omap-pm/fix-mtd.diff | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/fix-mtd.diff b/recipes/linux/linux-omap-pm/fix-mtd.diff new file mode 100644 index 0000000000..76fe001fcd --- /dev/null +++ b/recipes/linux/linux-omap-pm/fix-mtd.diff @@ -0,0 +1,51 @@ +From patchwork Sat Jun 27 05:37:06 2009 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [MTD,NAND] : fix omap2.c compile failure and warning +Date: Fri, 26 Jun 2009 19:37:06 -0000 +From: Singh, Vimal <vimalsingh@ti.com> +X-Patchwork-Id: 29225 + +> The 'status' you return in the case that you _have_ gone through the +> loop is still wrong though, isn't it? +Yes, I have corrected that in below patch. Its my bad, I did not fix it +previously. + +Signed-off-by: Vimal Singh <vimalsingh at ti.com> +Signed-off-by: Ming Lei <tom.leiming at gmail.com> + +--- + + +diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c +index 0cd76f8..3b6e6ad 100644 +--- a/drivers/mtd/nand/omap2.c ++++ b/drivers/mtd/nand/omap2.c +@@ -11,6 +11,8 @@ + #include <linux/platform_device.h> + #include <linux/dma-mapping.h> + #include <linux/delay.h> ++#include <linux/jiffies.h> ++#include <linux/sched.h> + #include <linux/mtd/mtd.h> + #include <linux/mtd/nand.h> + #include <linux/mtd/partitions.h> +@@ -541,7 +543,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip + struct omap_nand_info *info = container_of(mtd, struct omap_nand_info, + mtd); + unsigned long timeo = jiffies; +- int status, state = this->state; ++ int status = NAND_STATUS_FAIL, state = this->state; + + if (state == FL_ERASING) + timeo += (HZ * 400) / 1000; +@@ -558,6 +560,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip + status = __raw_readb(this->IO_ADDR_R); +- if (!(status & 0x40)) ++ if (status & NAND_STATUS_READY) + break; ++ cond_resched(); + } + return status; + } |