[PATCH]-2.6.10-rc2: Fix Compiler Warning parport_pc.c

From: Bryan Batten
Date: Thu Nov 18 2004 - 14:16:16 EST


After patching up to 2.6.10-rc2, I get the following compiler warning
when building the kernel with gcc 2.95:

drivers/parport/parport_pc.c:3317: warning: initialization from incompatible pointer type

The warning occurs because parport_init_mode_setup() wants 'char *'
instead of 'const char *'.

The fix is to just remove the 'const' from the declaration.

Here's the patch to drivers/parport/parport_pc.c:
--------------------------------snip-snip-----------------------------
# diff -up *orig/drivers/parport/parport_pc.c *6x/drivers/parport
--- linux-2.6.9orig/drivers/parport/parport_pc.c Mon Nov 15 22:44:11 2004
+++ linux-2.6x/drivers/parport/parport_pc.c Wed Nov 17 22:35:37 2004
@@ -3154,7 +3154,7 @@ static int __init parport_parse_dma(cons
PARPORT_DMA_NONE, PARPORT_DMA_NOFIFO);
}

-static int __init parport_init_mode_setup(const char *str) {
+static int __init parport_init_mode_setup(char *str) {

printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str);

------------------------------end-snip-snip---------------------------

(Signed-off-by: Bryan Batten <BryanBatten@xxxxxxxxxxxxxx>)






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/