diff options
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index d8b9d2b8c200..34e75bc8f4cc 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -77,23 +77,9 @@ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; | |||
77 | */ | 77 | */ |
78 | #define is_real_interrupt(irq) ((irq) != 0) | 78 | #define is_real_interrupt(irq) ((irq) != 0) |
79 | 79 | ||
80 | /* | ||
81 | * This converts from our new CONFIG_ symbols to the symbols | ||
82 | * that asm/serial.h expects. You _NEED_ to comment out the | ||
83 | * linux/config.h include contained inside asm/serial.h for | ||
84 | * this to work. | ||
85 | */ | ||
86 | #undef CONFIG_SERIAL_MANY_PORTS | ||
87 | #undef CONFIG_SERIAL_DETECT_IRQ | ||
88 | #undef CONFIG_SERIAL_MULTIPORT | ||
89 | #undef CONFIG_HUB6 | ||
90 | |||
91 | #ifdef CONFIG_SERIAL_8250_DETECT_IRQ | 80 | #ifdef CONFIG_SERIAL_8250_DETECT_IRQ |
92 | #define CONFIG_SERIAL_DETECT_IRQ 1 | 81 | #define CONFIG_SERIAL_DETECT_IRQ 1 |
93 | #endif | 82 | #endif |
94 | #ifdef CONFIG_SERIAL_8250_MULTIPORT | ||
95 | #define CONFIG_SERIAL_MULTIPORT 1 | ||
96 | #endif | ||
97 | #ifdef CONFIG_SERIAL_8250_MANY_PORTS | 83 | #ifdef CONFIG_SERIAL_8250_MANY_PORTS |
98 | #define CONFIG_SERIAL_MANY_PORTS 1 | 84 | #define CONFIG_SERIAL_MANY_PORTS 1 |
99 | #endif | 85 | #endif |
@@ -2323,10 +2309,11 @@ static int __devinit serial8250_probe(struct device *dev) | |||
2323 | { | 2309 | { |
2324 | struct plat_serial8250_port *p = dev->platform_data; | 2310 | struct plat_serial8250_port *p = dev->platform_data; |
2325 | struct uart_port port; | 2311 | struct uart_port port; |
2312 | int ret, i; | ||
2326 | 2313 | ||
2327 | memset(&port, 0, sizeof(struct uart_port)); | 2314 | memset(&port, 0, sizeof(struct uart_port)); |
2328 | 2315 | ||
2329 | for (; p && p->flags != 0; p++) { | 2316 | for (i = 0; p && p->flags != 0; p++, i++) { |
2330 | port.iobase = p->iobase; | 2317 | port.iobase = p->iobase; |
2331 | port.membase = p->membase; | 2318 | port.membase = p->membase; |
2332 | port.irq = p->irq; | 2319 | port.irq = p->irq; |
@@ -2335,10 +2322,16 @@ static int __devinit serial8250_probe(struct device *dev) | |||
2335 | port.iotype = p->iotype; | 2322 | port.iotype = p->iotype; |
2336 | port.flags = p->flags; | 2323 | port.flags = p->flags; |
2337 | port.mapbase = p->mapbase; | 2324 | port.mapbase = p->mapbase; |
2325 | port.hub6 = p->hub6; | ||
2338 | port.dev = dev; | 2326 | port.dev = dev; |
2339 | if (share_irqs) | 2327 | if (share_irqs) |
2340 | port.flags |= UPF_SHARE_IRQ; | 2328 | port.flags |= UPF_SHARE_IRQ; |
2341 | serial8250_register_port(&port); | 2329 | ret = serial8250_register_port(&port); |
2330 | if (ret < 0) { | ||
2331 | dev_err(dev, "unable to register port at index %d " | ||
2332 | "(IO%lx MEM%lx IRQ%d): %d\n", i, | ||
2333 | p->iobase, p->mapbase, p->irq, ret); | ||
2334 | } | ||
2342 | } | 2335 | } |
2343 | return 0; | 2336 | return 0; |
2344 | } | 2337 | } |