[PATCH/RFC] Create mtdram device at runtime.

johan.adolfsson at axis.com johan.adolfsson at axis.com
Tue Apr 30 09:19:45 EDT 2002

> johan.adolfsson at axis.com said:
> > Here it comes, not tested though... Beleive I took care of the cleanup
> > as well.
> What about the case where mtdram_init_device() is called from elsewhere?
> Perhaps we should register a cleanup function with as mtdram_init_device()
> and call _that_ in the later cleanup?
> --
> dwmw2

How about letting mtdram_init_device return an allocated mtd_info*
and the caller is responsible for cleaning it up?
The hardcoded init functions store the returned pointer in the
static mtd_info variable and do it's clean-up on exit.


More information about the linux-mtd mailing list