Messages in this thread | | | Date | Wed, 17 Nov 2004 00:26:00 +0100 | From | Andries Brouwer <> | Subject | Re: [PATCH] PCI: fix build errors with CONFIG_PCI=n |
| |
On Tue, Nov 16, 2004 at 02:34:48PM -0800, Randy.Dunlap wrote:
> Fix (most of) kernel build for CONFIG_PCI=n. Fixes these 3 errors: > > 1. drivers/parport/parport_pc.c:3162: error: `parport_init_mode' > undeclared (first use in this function)
Life is easier if you do not use attachments. (Then I can more easily comment the code.)
You write
-static int __init parport_init_mode_setup(const char *str) { - +#ifdef CONFIG_PCI +static int __init parport_init_mode_setup(const char *str)
In my tree I have
static int __init parport_init_mode_setup(char *str) {
in order to avoid the warning for
__setup("parport_init_mode=",parport_init_mode_setup);
since the parameter is a int (*setup_func)(char *); - see
struct obs_kernel_param { const char *str; int (*setup_func)(char *); int early; };
Apart from this prototype change I only moved the single line
static int __initdata parport_init_mode = 0;
outside the #ifdef's. Is that not good enough, and better than introducing more #ifdef's? Keeps the source smaller.
Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |