[PATCH v13 4/4]: mtdoops: refactor as a kmsg_dumper

Simon Kagstrom simon.kagstrom at netinsight.net
Wed Nov 11 06:27:21 EST 2009


On Wed, 11 Nov 2009 12:29:42 +0200
Artem Bityutskiy <dedekind1 at gmail.com> wrote:

> On Wed, 2009-11-11 at 10:46 +0100, Simon Kagstrom wrote:
> > On Tue, 10 Nov 2009 18:11:33 +0200
> > 
> > > Do we really need this notifiers? Would not it be better to open mtd
> > > device straight in the module_init function instead?
> > 
> > If the mtdoops driver is built into the kernel, module_init might be
> > (and I believe will be) called before the MTD partitions have been
> > created. With the MTD notifiers, this problem is worked around.
> 
> But this is why we have late_initcall(), which we can use instead of
> module_init().

OK, makes sense (you learn something new every day!). But I still have
one, perhaps artificial, use-case for keeping it as-is: MTD devices
might show up later if they are loaded as modules. In my case I use
phram as a module, and if I were to use that with MTDoops in the
kernel, I still need the notifiers.

But loading mtdoops after phram would also work obviously.

// Simon



More information about the linux-mtd mailing list