diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-02 17:52:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-02 17:52:07 -0400 |
commit | 3fbcd940dfb6f11d016801a5e4b89cbe88ddc412 (patch) | |
tree | 79dc1763a3e90caafd8dffd9eb4e30d917647f99 | |
parent | e694420258cb1af5eb5a06e4b1a027e8c917d027 (diff) | |
parent | e9422e091531c5851da4ffb8ee6dcbc36dc5b7a9 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
[SERIAL] 8250: constify some serial structs
[SERIAL] Make uart_match_port() work with all memory mapped UARTs
-rw-r--r-- | drivers/serial/8250_pci.c | 17 | ||||
-rw-r--r-- | drivers/serial/serial_core.c | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index cd1979daf2b8..851e4839d6d9 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -458,11 +458,11 @@ static int pci_siig_setup(struct serial_private *priv, | |||
458 | * growing *huge*, we use this function to collapse some 70 entries | 458 | * growing *huge*, we use this function to collapse some 70 entries |
459 | * in the PCI table into one, for sanity's and compactness's sake. | 459 | * in the PCI table into one, for sanity's and compactness's sake. |
460 | */ | 460 | */ |
461 | static unsigned short timedia_single_port[] = { | 461 | static const unsigned short timedia_single_port[] = { |
462 | 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 | 462 | 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 |
463 | }; | 463 | }; |
464 | 464 | ||
465 | static unsigned short timedia_dual_port[] = { | 465 | static const unsigned short timedia_dual_port[] = { |
466 | 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, | 466 | 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, |
467 | 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, | 467 | 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, |
468 | 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, | 468 | 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, |
@@ -470,35 +470,34 @@ static unsigned short timedia_dual_port[] = { | |||
470 | 0xD079, 0 | 470 | 0xD079, 0 |
471 | }; | 471 | }; |
472 | 472 | ||
473 | static unsigned short timedia_quad_port[] = { | 473 | static const unsigned short timedia_quad_port[] = { |
474 | 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, | 474 | 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, |
475 | 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, | 475 | 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, |
476 | 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, | 476 | 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, |
477 | 0xB157, 0 | 477 | 0xB157, 0 |
478 | }; | 478 | }; |
479 | 479 | ||
480 | static unsigned short timedia_eight_port[] = { | 480 | static const unsigned short timedia_eight_port[] = { |
481 | 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, | 481 | 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, |
482 | 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 | 482 | 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 |
483 | }; | 483 | }; |
484 | 484 | ||
485 | static const struct timedia_struct { | 485 | static const struct timedia_struct { |
486 | int num; | 486 | int num; |
487 | unsigned short *ids; | 487 | const unsigned short *ids; |
488 | } timedia_data[] = { | 488 | } timedia_data[] = { |
489 | { 1, timedia_single_port }, | 489 | { 1, timedia_single_port }, |
490 | { 2, timedia_dual_port }, | 490 | { 2, timedia_dual_port }, |
491 | { 4, timedia_quad_port }, | 491 | { 4, timedia_quad_port }, |
492 | { 8, timedia_eight_port }, | 492 | { 8, timedia_eight_port } |
493 | { 0, NULL } | ||
494 | }; | 493 | }; |
495 | 494 | ||
496 | static int pci_timedia_init(struct pci_dev *dev) | 495 | static int pci_timedia_init(struct pci_dev *dev) |
497 | { | 496 | { |
498 | unsigned short *ids; | 497 | const unsigned short *ids; |
499 | int i, j; | 498 | int i, j; |
500 | 499 | ||
501 | for (i = 0; timedia_data[i].num; i++) { | 500 | for (i = 0; i < ARRAY_SIZE(timedia_data); i++) { |
502 | ids = timedia_data[i].ids; | 501 | ids = timedia_data[i].ids; |
503 | for (j = 0; ids[j]; j++) | 502 | for (j = 0; ids[j]; j++) |
504 | if (dev->subsystem_device == ids[j]) | 503 | if (dev->subsystem_device == ids[j]) |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 80ef7d482756..372e47f7d596 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -2377,6 +2377,9 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2) | |||
2377 | return (port1->iobase == port2->iobase) && | 2377 | return (port1->iobase == port2->iobase) && |
2378 | (port1->hub6 == port2->hub6); | 2378 | (port1->hub6 == port2->hub6); |
2379 | case UPIO_MEM: | 2379 | case UPIO_MEM: |
2380 | case UPIO_MEM32: | ||
2381 | case UPIO_AU: | ||
2382 | case UPIO_TSI: | ||
2380 | return (port1->mapbase == port2->mapbase); | 2383 | return (port1->mapbase == port2->mapbase); |
2381 | } | 2384 | } |
2382 | return 0; | 2385 | return 0; |