| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 30/36] Don't clobber spinlocks in 8250. |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Mon, 27 Oct 2008 17:04:07 -0700 |
| Cc: | linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, akpm@linux-foundation.org, David Daney <ddaney@caviumnetworks.com>, Tomaso Paoletti <tpaoletti@caviumnetworks.com> |
| In-reply-to: | <490655B6.4030406@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <490655B6.4030406@caviumnetworks.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
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 | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 303272a..8e28750 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2752,12 +2752,23 @@ 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;
return 0;
}
--
1.5.6.5
|
| Previous by Date: | [PATCH 28/36] MIPS: move FPU emulator externs to fpu_emulator.h, David Daney |
|---|---|
| Next by Date: | [PATCH 32/36] Allow port type to be specified when calling serial8250_register_port., David Daney |
| Previous by Thread: | Re: [PATCH 02/36] Add Cavium OCTEON files to arch/mips/include/asm/mach-cavium-octeon, Ralf Baechle |
| Next by Thread: | [PATCH 31/36] Generic 8250 serial driver changes to support future OCTEON serial patches., David Daney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |