Re: [PATCH 6/11] serio dynamic allocation

From: Andrew Morton
Date: Sun Jun 20 2004 - 01:29:13 EST


Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx> wrote:
>
> >
> > It seems that simply removing that static initialiser will fix
> > it up, but I assume it was added for some reason, so I'll leave
> > you to ponder that.
> >
>
> No, removing the initialization is the correct way to fix it. We can
> only assign these values after platform init is done.

Ok..

You'll be needing this...

25-sparc64-akpm/drivers/serial/sunsu.c | 8 ++++----
25-sparc64-akpm/drivers/serial/sunzilog.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)

diff -puN drivers/serial/sunzilog.c~input-serio-renames-1-fix drivers/serial/sunzilog.c
--- 25-sparc64/drivers/serial/sunzilog.c~input-serio-renames-1-fix 2004-06-19 23:12:14.764325264 -0700
+++ 25-sparc64-akpm/drivers/serial/sunzilog.c 2004-06-19 23:15:09.411774816 -0700
@@ -1295,7 +1295,7 @@ static spinlock_t sunzilog_serio_lock =

static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
{
- struct uart_sunzilog_port *up = serio->driver;
+ struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;

spin_lock_irqsave(&sunzilog_serio_lock, flags);
@@ -1309,7 +1309,7 @@ static int sunzilog_serio_write(struct s

static int sunzilog_serio_open(struct serio *serio)
{
- struct uart_sunzilog_port *up = serio->driver;
+ struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;
int ret;

@@ -1326,7 +1326,7 @@ static int sunzilog_serio_open(struct se

static void sunzilog_serio_close(struct serio *serio)
{
- struct uart_sunzilog_port *up = serio->driver;
+ struct uart_sunzilog_port *up = serio->port_data;
unsigned long flags;

spin_lock_irqsave(&sunzilog_serio_lock, flags);
@@ -1549,7 +1549,7 @@ static void __init sunzilog_init_kbdms(s
#ifdef CONFIG_SERIO
memset(&up->serio, 0, sizeof(up->serio));

- up->serio.driver = up;
+ up->serio.port_data = up;

up->serio.type = SERIO_RS232;
if (channel == KEYBOARD_LINE) {
diff -puN drivers/serial/sunsu.c~input-serio-renames-1-fix drivers/serial/sunsu.c
--- 25-sparc64/drivers/serial/sunsu.c~input-serio-renames-1-fix 2004-06-19 23:12:14.780322832 -0700
+++ 25-sparc64-akpm/drivers/serial/sunsu.c 2004-06-19 23:16:11.737299896 -0700
@@ -994,7 +994,7 @@ static spinlock_t sunsu_serio_lock = SPI

static int sunsu_serio_write(struct serio *serio, unsigned char ch)
{
- struct uart_sunsu_port *up = serio->driver;
+ struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;
int lsr;

@@ -1014,7 +1014,7 @@ static int sunsu_serio_write(struct seri

static int sunsu_serio_open(struct serio *serio)
{
- struct uart_sunsu_port *up = serio->driver;
+ struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;
int ret;

@@ -1031,7 +1031,7 @@ static int sunsu_serio_open(struct serio

static void sunsu_serio_close(struct serio *serio)
{
- struct uart_sunsu_port *up = serio->driver;
+ struct uart_sunsu_port *up = serio->port_data;
unsigned long flags;

spin_lock_irqsave(&sunsu_serio_lock, flags);
@@ -1311,7 +1311,7 @@ static int __init sunsu_kbd_ms_init(void
#ifdef CONFIG_SERIO
memset(&up->serio, 0, sizeof(up->serio));

- up->serio.driver = up;
+ up->serio.port_data = up;

up->serio.type = SERIO_RS232;
if (up->su_type == SU_PORT_KBD) {
_

-
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/