summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorDavid Woodhouse2009-06-08 13:21:27 +0200
committerDavid Woodhouse2009-06-08 13:21:27 +0200
commite635a01ea0a16cf7cd31ecd2305870385dca9be6 (patch)
treec7153e7dee5caf6ac90d85694ff27e4d0b606290 /drivers/mtd/devices
parentmtd: physmap_of: Add multiple regions and concatenation support (diff)
parent[MTD] [NAND] S3C2410: Use DIV_ROUND_UP (diff)
downloadkernel-qcow2-linux-e635a01ea0a16cf7cd31ecd2305870385dca9be6.tar.gz
kernel-qcow2-linux-e635a01ea0a16cf7cd31ecd2305870385dca9be6.tar.xz
kernel-qcow2-linux-e635a01ea0a16cf7cd31ecd2305870385dca9be6.zip
Merge branch 'next-mtd' of git://aeryn.fluff.org.uk/bjdooks/linux
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 62dee54af0a5..43976aa4dbb1 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
/* Calculate flash page address; use block erase (for speed) if
* we're at a block boundary and need to erase the whole block.
*/
- pageaddr = div_u64(instr->len, priv->page_size);
+ pageaddr = div_u64(instr->addr, priv->page_size);
do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
pageaddr = pageaddr << priv->page_offset;