aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorGreg KH <greg@press.(none)>2005-06-28 01:07:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-28 01:07:56 -0400
commit8644d2a42bdba2d513f71c07eaf1b6f9b718b8eb (patch)
treec43b6c2fdf1b68b66906a2de69446dcec0f9af6b /drivers/serial/8250.c
parent1cde8a16815bd85c8137d1ea556398983c597c11 (diff)
parent99f95e5286df2f69edab8a04c7080d986ee4233b (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c25
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}