Re: [PATCH] gcc4 fix for sn_serial.c

From: Andreas Schwab
Date: Tue Apr 26 2005 - 17:58:55 EST


Jesse Barnes <jbarnes@xxxxxxxxxxxx> writes:

> On Monday, March 14, 2005 5:03 pm, Adrian Bunk wrote:
>> > -static struct uart_driver sal_console_uart = {
>> > +struct uart_driver sal_console_uart = {
>> > .owner = THIS_MODULE,
>> > .driver_name = "sn_console",
>> > .dev_name = DEVICE_NAME,
>>
>> Why can't you solve this without making sal_console_uart global?
>
> I think that would mean moving some of the structure initializaiton into an
> init function somewhere.

Just make the tentative definition static.

Signed-off-by: Andreas Schwab <schwab@xxxxxxx>

--- linux-2.6/drivers/serial/sn_console.c.~1~ 2005-04-26 14:42:39.994841943 +0200
+++ linux-2.6/drivers/serial/sn_console.c 2005-04-27 00:50:40.301718840 +0200
@@ -821,7 +821,7 @@ static void __init sn_sal_switch_to_inte

static void sn_sal_console_write(struct console *, const char *, unsigned);
static int __init sn_sal_console_setup(struct console *, char *);
-extern struct uart_driver sal_console_uart;
+static struct uart_driver sal_console_uart;
extern struct tty_driver *uart_console_device(struct console *, int *);

static struct console sal_console = {

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
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/