Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185175
b: refs/heads/master
c: b5d228c
h: refs/heads/master
i:
  185173: 60cacce
  185171: 5a989f2
  185167: d4ce891
v: v3
  • Loading branch information
Shmulik Ladkani authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 7f21013 commit 0289ced
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ccf68e59e93181df9353c0cc721459d18ff200b6
refs/heads/master: b5d228cc4f854aebcefac987d111fc072ecd15e0
21 changes: 15 additions & 6 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -2690,6 +2690,15 @@ static void __init serial8250_isa_init_ports(void)
}
}

static void
serial8250_init_fixed_type_port(struct uart_8250_port *up, unsigned int type)
{
up->port.type = type;
up->port.fifosize = uart_config[type].fifo_size;
up->capabilities = uart_config[type].flags;
up->tx_loadsz = uart_config[type].tx_loadsz;
}

static void __init
serial8250_register_ports(struct uart_driver *drv, struct device *dev)
{
Expand All @@ -2706,6 +2715,10 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
struct uart_8250_port *up = &serial8250_ports[i];

up->port.dev = dev;

if (up->port.flags & UPF_FIXED_TYPE)
serial8250_init_fixed_type_port(up, up->port.type);

uart_add_one_port(drv, &up->port);
}
}
Expand Down Expand Up @@ -3118,12 +3131,8 @@ int serial8250_register_port(struct uart_port *port)
if (port->dev)
uart->port.dev = port->dev;

if (port->flags & UPF_FIXED_TYPE) {
uart->port.type = port->type;
uart->port.fifosize = uart_config[port->type].fifo_size;
uart->capabilities = uart_config[port->type].flags;
uart->tx_loadsz = uart_config[port->type].tx_loadsz;
}
if (port->flags & UPF_FIXED_TYPE)
serial8250_init_fixed_type_port(uart, port->type);

set_io_from_upio(&uart->port);
/* Possibly override default I/O functions. */
Expand Down

0 comments on commit 0289ced

Please sign in to comment.