[PATCH - V2] Add NAND lock/unlock routines
David Woodhouse
dwmw2 at infradead.org
Fri Feb 26 07:47:40 EST 2010
On Wed, 2010-01-13 at 14:55 +0530, Vimal Singh wrote:
>
> >> @@ -2999,8 +3211,8 @@ int nand_scan_tail(struct mtd_info *mtd)
> >> mtd->read_oob = nand_read_oob;
> >> mtd->write_oob = nand_write_oob;
> >> mtd->sync = nand_sync;
> >> - mtd->lock = NULL;
> >> - mtd->unlock = NULL;
> >> + mtd->lock = nand_lock;
> >> + mtd->unlock = nand_unlock;
> >
> > What makes you believe it is safe to assign these call-backs here?
> >
> > AFAICS, this means it will be done for all flashes. Do all of them
> > support lock/unlock? I did not investigate this, but I think that
> > probably not.
>
> OK. In that case I'll rather not do it here and do it in my specific
> driver.
Hm, I'm not sure that's the best approach. It's a function of the NAND
chip, not the controller. We should detect the presence of the feature
from the chip ID, if at all possible.
I'm happy with your first two patches as part of a three-patch set
though. Thanks.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
More information about the linux-mtd
mailing list