[PATCH 13/17] MTD: export few functions from nand_base.c
maximlevitsky at gmail.com
Fri Feb 5 12:05:04 EST 2010
On Fri, 2010-02-05 at 10:32 +0800, stanley.miao wrote:
> Maxim Levitsky wrote:
> > This exports:
> > nand_do_read_oob
> > nand_do_write_oob
> nand_do_read_oob and nand_do_write_oob can't be exported. They are internal
> functions in NAND subsystem. If you want use them, please use mtd->read_oob
> and mtd->write_oob.
> > nand_get_device
> > nand_put_device
> > This functions will be used to implement custom oob based
> > bad block handling in upcoming smartmedia common module
Actually I don't like this patch ether.
The problem is that nand_erase_nand first takes the lock, and then calls
I could make the ->block_bad always take the lock (and this will allow
using ->read_oob) by first checking that all erase blocks are good, and
then doing the erase.
This would change the behavior slightly (Now if you attempt to erase
several erase blocks and one of them is marked as bad, erase stops at
first bad block. With the change, erase will fail completely.
Is this ok?
More information about the linux-mtd