Messages in this thread Patch in this message | | | Date | Fri, 7 Nov 1997 17:09:35 +0100 (MET) | From | Niels Kristian Bech Jensen <> | Subject | Re: Parport irq detection problem in 2.1.62 (patch supplied.) |
| |
On Fri, 7 Nov 1997, Tim Waugh wrote:
> Hmm, this looks like a problem with the code here: > > static int dma[PC_MAX_PORTS] = { PARPORT_DMA_AUTO, }; > static int irq[PC_MAX_PORTS] = { PARPORT_IRQ_AUTO, }; > > The intention was do set the entire array to PARPORT_xxx_AUTO, but only > the first element is initialised. > Thanks,
This patch solves my problem (the code is taken from parport_init.c where it inits the arrays for the parport_pc driver not compiled as a module.)
--- linux/drivers/misc/parport_pc.c.orig Fri Nov 7 11:38:50 1997 +++ linux/drivers/misc/parport_pc.c Fri Nov 7 16:27:57 1997 @@ -23,6 +23,7 @@ #include <linux/ioport.h> #include <linux/kernel.h> #include <linux/malloc.h> +#include <linux/init.h> #include <linux/parport.h> @@ -889,9 +890,9 @@ } #ifdef MODULE -static int io[PC_MAX_PORTS+1] = { 0, }; -static int dma[PC_MAX_PORTS] = { PARPORT_DMA_AUTO, }; -static int irq[PC_MAX_PORTS] = { PARPORT_IRQ_AUTO, }; +static int io[PC_MAX_PORTS+1] = __initdata { 0, }; +static int dma[PC_MAX_PORTS] = __initdata { PARPORT_DMA_AUTO, }; +static int irq[PC_MAX_PORTS] = __initdata { PARPORT_IRQ_AUTO, }; MODULE_PARM(io, "1-" __MODULE_STRING(PC_MAX_PORTS) "i"); MODULE_PARM(irq, "1-" __MODULE_STRING(PC_MAX_PORTS) "i"); MODULE_PARM(dma, "1-" __MODULE_STRING(PC_MAX_PORTS) "i"); -- Med venlig hilsen / Regards
Niels Kristian Bech Jensen nkbj@image.dk http://www.image.dk/~nkbj/
| |