* [PATCH] 8250: Don't clobber spinlocks in 8250.
@ 2008-10-15 16:51 David Daney
0 siblings, 0 replies; only message in thread
From: David Daney @ 2008-10-15 16:51 UTC (permalink / raw)
To: linux-serial; +Cc: linux-kernel, linux-mips, Paoletti, Tomaso
Don't clobber spinlocks in 8250.
In serial8250_isa_init_ports(), the port's lock is initialized. We
should not overwrite it. Only copy in the fields we need.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
---
drivers/serial/8250.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index d3ca7d3..da65fea 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2699,12 +2699,24 @@ static struct uart_driver serial8250_reg = {
*/
int __init early_serial_setup(struct uart_port *port)
{
+ struct uart_port *p;
+
if (port->line >= ARRAY_SIZE(serial8250_ports))
return -ENODEV;
serial8250_isa_init_ports();
- serial8250_ports[port->line].port = *port;
- serial8250_ports[port->line].port.ops = &serial8250_pops;
+ p = &serial8250_ports[port->line].port;
+ p->iobase = port->iobase;
+ p->membase = port->membase;
+ p->irq = port->irq;
+ p->uartclk = port->uartclk;
+ p->fifosize = port->fifosize;
+ p->regshift = port->regshift;
+ p->iotype = port->iotype;
+ p->flags = port->flags;
+ p->mapbase = port->mapbase;
+ p->private_data = port->private_data;
+ p->ops = &serial8250_pops;
return 0;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-15 21:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 16:51 [PATCH] 8250: Don't clobber spinlocks in 8250 David Daney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.