nvram driver not possible as a module
Guido Guenther
agx at sigxcpu.org
Thu Jan 20 20:55:46 EST 2005
Hi Joerg,
On Wed, Jan 19, 2005 at 11:14:48AM +0100, Joerg Dorchain wrote:
> KConfig says CONFIG_NVRAM is possible as a module. Loading the module
> fails because of an unknown symbol __alloc_bootmem. __alloc_bootmem is
> marked __init. The obvious workaround is to compile the driver not as a
> module, but how can this get really fixed?
Does this help:
--- linux-2.6.9.orig/arch/ppc/platforms/pmac_nvram.c 2004-10-18 23:53:51.000000000 +0200
+++ linux-2.6.9/arch/ppc/platforms/pmac_nvram.c 2004-10-25 09:53:15.000000000 +0200
@@ -488,7 +488,7 @@
printk(KERN_ERR "nvram: no address\n");
return;
}
- nvram_image = alloc_bootmem(NVRAM_SIZE);
+ nvram_image = kmalloc(NVRAM_SIZE, GFP_KERNEL);
if (nvram_image == NULL) {
printk(KERN_ERR "nvram: can't allocate ram image\n");
return;
Cheers,
-- Guido
More information about the Linuxppc-dev
mailing list