|
12 | 12 | * (C) Copyright 2001 John Marvin <jsm fc hp com> |
13 | 13 | * (C) Copyright 2003 Grant Grundler <grundler parisc-linux org> |
14 | 14 | * (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org> |
| 15 | + * (C) Copyright 2006 Helge Deller <deller@gmx.de> |
15 | 16 | * |
16 | 17 | * This program is free software; you can redistribute it and/or |
17 | 18 | * modify it under the terms of the GNU General Public License as |
@@ -388,43 +389,34 @@ int superio_fixup_irq(struct pci_dev *pcidev) |
388 | 389 | return local_irq; |
389 | 390 | } |
390 | 391 |
|
391 | | -static struct uart_port serial[] = { |
392 | | - { |
393 | | - .iotype = UPIO_PORT, |
394 | | - .line = 0, |
395 | | - .type = PORT_16550A, |
396 | | - .uartclk = 115200*16, |
397 | | - .fifosize = 16, |
398 | | - }, |
399 | | - { |
400 | | - .iotype = UPIO_PORT, |
401 | | - .line = 1, |
402 | | - .type = PORT_16550A, |
403 | | - .uartclk = 115200*16, |
404 | | - .fifosize = 16, |
405 | | - } |
406 | | -}; |
407 | | - |
408 | 392 | static void __devinit superio_serial_init(void) |
409 | 393 | { |
410 | 394 | #ifdef CONFIG_SERIAL_8250 |
411 | 395 | int retval; |
412 | | - |
413 | | - serial[0].iobase = sio_dev.sp1_base; |
414 | | - serial[0].irq = SP1_IRQ; |
415 | | - spin_lock_init(&serial[0].lock); |
416 | | - |
417 | | - retval = early_serial_setup(&serial[0]); |
| 396 | + struct uart_port serial_port; |
| 397 | + |
| 398 | + memset(&serial_port, 0, sizeof(serial_port)); |
| 399 | + serial_port.iotype = UPIO_PORT; |
| 400 | + serial_port.type = PORT_16550A; |
| 401 | + serial_port.uartclk = 115200*16; |
| 402 | + serial_port.fifosize = 16; |
| 403 | + spin_lock_init(&serial_port.lock); |
| 404 | + |
| 405 | + /* serial port #1 */ |
| 406 | + serial_port.iobase = sio_dev.sp1_base; |
| 407 | + serial_port.irq = SP1_IRQ; |
| 408 | + serial_port.line = 0; |
| 409 | + retval = early_serial_setup(&serial_port); |
418 | 410 | if (retval < 0) { |
419 | 411 | printk(KERN_WARNING PFX "Register Serial #0 failed.\n"); |
420 | 412 | return; |
421 | 413 | } |
422 | 414 |
|
423 | | - serial[1].iobase = sio_dev.sp2_base; |
424 | | - serial[1].irq = SP2_IRQ; |
425 | | - spin_lock_init(&serial[1].lock); |
426 | | - retval = early_serial_setup(&serial[1]); |
427 | | - |
| 415 | + /* serial port #2 */ |
| 416 | + serial_port.iobase = sio_dev.sp2_base; |
| 417 | + serial_port.irq = SP2_IRQ; |
| 418 | + serial_port.line = 1; |
| 419 | + retval = early_serial_setup(&serial_port); |
428 | 420 | if (retval < 0) |
429 | 421 | printk(KERN_WARNING PFX "Register Serial #1 failed.\n"); |
430 | 422 | #endif /* CONFIG_SERIAL_8250 */ |
|
0 commit comments