diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 155737e7483f..a19480d07888 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) | |||
178 | * we're at a block boundary and need to erase the whole block. | 178 | * we're at a block boundary and need to erase the whole block. |
179 | */ | 179 | */ |
180 | pageaddr = instr->addr / priv->page_size; | 180 | pageaddr = instr->addr / priv->page_size; |
181 | do_block = (pageaddr & 0x7) == 0 && instr->len <= blocksize; | 181 | do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; |
182 | pageaddr = pageaddr << priv->page_offset; | 182 | pageaddr = pageaddr << priv->page_offset; |
183 | 183 | ||
184 | command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; | 184 | command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; |