Skip to content

Commit

Permalink
serial/8250_hp300: Missing 8250 register interface conversion bits
Browse files Browse the repository at this point in the history
commit 2655a2c ("8250: use the 8250
register interface not the legacy one") forgot to fully switch one
instance of struct uart_port to struct uart_8250_port, causing the
following compile failure:

drivers/tty/serial/8250/8250_hp300.c: In function ‘hpdca_init_one’:
drivers/tty/serial/8250/8250_hp300.c:174: error: ‘uart’ undeclared (first use in this function)
drivers/tty/serial/8250/8250_hp300.c:174: error: (Each undeclared identifier is reported only once
drivers/tty/serial/8250/8250_hp300.c:174: error: for each function it appears in.)

This went unnoticed in -next, as CONFIG_HPDCA is not set to y by
allmodconfig.

Reported-by: Fengguang Wu <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Philip Blundell <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
geertu authored and gregkh committed Oct 15, 2012
1 parent c362495 commit 3e5bde8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/tty/serial/8250/8250_hp300.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int __init hp300_setup_serial_console(void)
static int __devinit hpdca_init_one(struct dio_dev *d,
const struct dio_device_id *ent)
{
struct uart_port port;
struct uart_8250_port uart;
int line;

#ifdef CONFIG_SERIAL_8250_CONSOLE
Expand All @@ -174,19 +174,19 @@ static int __devinit hpdca_init_one(struct dio_dev *d,
memset(&uart, 0, sizeof(uart));

/* Memory mapped I/O */
port.iotype = UPIO_MEM;
port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF;
port.irq = d->ipl;
port.uartclk = HPDCA_BAUD_BASE * 16;
port.mapbase = (d->resource.start + UART_OFFSET);
port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE);
port.regshift = 1;
port.dev = &d->dev;
uart.port.iotype = UPIO_MEM;
uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF;
uart.port.irq = d->ipl;
uart.port.uartclk = HPDCA_BAUD_BASE * 16;
uart.port.mapbase = (d->resource.start + UART_OFFSET);
uart.port.membase = (char *)(uart.port.mapbase + DIO_VIRADDRBASE);
uart.port.regshift = 1;
uart.port.dev = &d->dev;
line = serial8250_register_8250_port(&uart);

if (line < 0) {
printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d"
" irq %d failed\n", d->scode, port.irq);
" irq %d failed\n", d->scode, uart.port.irq);
return -ENOMEM;
}

Expand Down

0 comments on commit 3e5bde8

Please sign in to comment.