[PATCH,RFC] [MTD] replace MTD_NORFLASH with MTD_GENERIC_TYPE
Nicolas Pitre
nico at cam.org
Tue May 30 14:13:49 EDT 2006
On Tue, 30 May 2006, Jörn Engel wrote:
> On Tue, 30 May 2006 12:32:58 -0400, Nicolas Pitre wrote:
> >
> > I'm firmly with you and so far I agree 100% with your effort. The
> > cleanups you're providing are much appreciated.
> >
> > However Artem might have a point. You probably should leave mtd->type
> > alone, at least for now. It is good to not depend on it anymore but it
> > probably still has its informative value, just like name string attached
> > to MTD partitions. If it should go then it should be removed at the
> > very end when no one uses it anymore.
>
> In a way, that is what I do. mtd->type still exists, although only
> for those types that are still used. MTD_RAM and MTD_ROM have been
> converted to MTD_GENERIC_TYPE. In part, that helps me to easily see
> how far I've come with a simple grep. And in part it prevents others
> from reintroducing new dependencies. My plan is to remove mtd->type
> completely when every device is of type MTD_GENERIC_TYPE.
>
> But if there is a general consensus, I can leave that field alone for
> now and hope that people don't introduce new dependencies.
Like you discovered yourself, people tend to duplicate existing code.
So once enough of the current code is moved away from using mtd->type
then the probability for new usage added to the tree will go down as
well.
Nicolas
More information about the linux-mtd
mailing list