diff mbox

Possible bug in onenand_base ?

Message ID AANLkTikDPqoO_VGJtBKWHutPOb60XAIUAYOu7kIRxMyQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Enric Balletbo Serra July 12, 2010, 2:59 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mtd/onenand/onenand_base.c
b/drivers/mtd/onenand/onenand_base.c
index 26caf25..a39d906 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -377,7 +377,7 @@  static int onenand_command(struct mtd_info *mtd,
int cmd, loff_t addr, size_t le

        default:
                block = onenand_block(this, addr);
-               page = (int) (addr - onenand_addr(this, block)) >>
this->page_shift;
+               page = (int) (addr >> this->page_shift);