diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-07-27 06:31:19 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-07-27 06:31:19 -0400 |
commit | 1c7c1fe51629d82e1dff22b2c4d409b252fb2b05 (patch) | |
tree | 10fffc573c4951098900044727f53af908020779 | |
parent | 9e566d8bd61f939b7f5d7d969f5b178571471cf9 (diff) |
[SERIAL] Rename pci_board to pciserial_board.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | drivers/serial/8250_pci.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 356f5556759a..84c8f8f592ca 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -54,7 +54,7 @@ | |||
54 | /* Use the Base address register size to cap number of ports */ | 54 | /* Use the Base address register size to cap number of ports */ |
55 | #define FL_REGION_SZ_CAP 0x0100 | 55 | #define FL_REGION_SZ_CAP 0x0100 |
56 | 56 | ||
57 | struct pci_board { | 57 | struct pciserial_board { |
58 | unsigned int flags; | 58 | unsigned int flags; |
59 | unsigned int num_ports; | 59 | unsigned int num_ports; |
60 | unsigned int base_baud; | 60 | unsigned int base_baud; |
@@ -75,7 +75,7 @@ struct pci_serial_quirk { | |||
75 | u32 subvendor; | 75 | u32 subvendor; |
76 | u32 subdevice; | 76 | u32 subdevice; |
77 | int (*init)(struct pci_dev *dev); | 77 | int (*init)(struct pci_dev *dev); |
78 | int (*setup)(struct pci_dev *dev, struct pci_board *board, | 78 | int (*setup)(struct pci_dev *dev, struct pciserial_board *, |
79 | struct uart_port *port, int idx); | 79 | struct uart_port *port, int idx); |
80 | void (*exit)(struct pci_dev *dev); | 80 | void (*exit)(struct pci_dev *dev); |
81 | }; | 81 | }; |
@@ -136,7 +136,7 @@ setup_port(struct pci_dev *dev, struct uart_port *port, | |||
136 | * Not that ugly ;) -- HW | 136 | * Not that ugly ;) -- HW |
137 | */ | 137 | */ |
138 | static int | 138 | static int |
139 | afavlab_setup(struct pci_dev *dev, struct pci_board *board, | 139 | afavlab_setup(struct pci_dev *dev, struct pciserial_board *board, |
140 | struct uart_port *port, int idx) | 140 | struct uart_port *port, int idx) |
141 | { | 141 | { |
142 | unsigned int bar, offset = board->first_offset; | 142 | unsigned int bar, offset = board->first_offset; |
@@ -189,7 +189,7 @@ static int __devinit pci_hp_diva_init(struct pci_dev *dev) | |||
189 | * some serial ports are supposed to be hidden on certain models. | 189 | * some serial ports are supposed to be hidden on certain models. |
190 | */ | 190 | */ |
191 | static int | 191 | static int |
192 | pci_hp_diva_setup(struct pci_dev *dev, struct pci_board *board, | 192 | pci_hp_diva_setup(struct pci_dev *dev, struct pciserial_board *board, |
193 | struct uart_port *port, int idx) | 193 | struct uart_port *port, int idx) |
194 | { | 194 | { |
195 | unsigned int offset = board->first_offset; | 195 | unsigned int offset = board->first_offset; |
@@ -307,7 +307,7 @@ static void __devexit pci_plx9050_exit(struct pci_dev *dev) | |||
307 | 307 | ||
308 | /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ | 308 | /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ |
309 | static int | 309 | static int |
310 | sbs_setup(struct pci_dev *dev, struct pci_board *board, | 310 | sbs_setup(struct pci_dev *dev, struct pciserial_board *board, |
311 | struct uart_port *port, int idx) | 311 | struct uart_port *port, int idx) |
312 | { | 312 | { |
313 | unsigned int bar, offset = board->first_offset; | 313 | unsigned int bar, offset = board->first_offset; |
@@ -523,7 +523,7 @@ static int __devinit pci_timedia_init(struct pci_dev *dev) | |||
523 | * Ugh, this is ugly as all hell --- TYT | 523 | * Ugh, this is ugly as all hell --- TYT |
524 | */ | 524 | */ |
525 | static int | 525 | static int |
526 | pci_timedia_setup(struct pci_dev *dev, struct pci_board *board, | 526 | pci_timedia_setup(struct pci_dev *dev, struct pciserial_board *board, |
527 | struct uart_port *port, int idx) | 527 | struct uart_port *port, int idx) |
528 | { | 528 | { |
529 | unsigned int bar = 0, offset = board->first_offset; | 529 | unsigned int bar = 0, offset = board->first_offset; |
@@ -556,7 +556,8 @@ pci_timedia_setup(struct pci_dev *dev, struct pci_board *board, | |||
556 | * Some Titan cards are also a little weird | 556 | * Some Titan cards are also a little weird |
557 | */ | 557 | */ |
558 | static int | 558 | static int |
559 | titan_400l_800l_setup(struct pci_dev *dev, struct pci_board *board, | 559 | titan_400l_800l_setup(struct pci_dev *dev, |
560 | struct pciserial_board *board, | ||
560 | struct uart_port *port, int idx) | 561 | struct uart_port *port, int idx) |
561 | { | 562 | { |
562 | unsigned int bar, offset = board->first_offset; | 563 | unsigned int bar, offset = board->first_offset; |
@@ -593,7 +594,7 @@ static int __devinit pci_netmos_init(struct pci_dev *dev) | |||
593 | } | 594 | } |
594 | 595 | ||
595 | static int | 596 | static int |
596 | pci_default_setup(struct pci_dev *dev, struct pci_board *board, | 597 | pci_default_setup(struct pci_dev *dev, struct pciserial_board *board, |
597 | struct uart_port *port, int idx) | 598 | struct uart_port *port, int idx) |
598 | { | 599 | { |
599 | unsigned int bar, offset = board->first_offset, maxnr; | 600 | unsigned int bar, offset = board->first_offset, maxnr; |
@@ -990,7 +991,7 @@ static struct pci_serial_quirk *find_quirk(struct pci_dev *dev) | |||
990 | } | 991 | } |
991 | 992 | ||
992 | static _INLINE_ int | 993 | static _INLINE_ int |
993 | get_pci_irq(struct pci_dev *dev, struct pci_board *board, int idx) | 994 | get_pci_irq(struct pci_dev *dev, struct pciserial_board *board, int idx) |
994 | { | 995 | { |
995 | if (board->flags & FL_NOIRQ) | 996 | if (board->flags & FL_NOIRQ) |
996 | return 0; | 997 | return 0; |
@@ -1113,7 +1114,7 @@ enum pci_board_num_t { | |||
1113 | * see first lines of serial_in() and serial_out() in 8250.c | 1114 | * see first lines of serial_in() and serial_out() in 8250.c |
1114 | */ | 1115 | */ |
1115 | 1116 | ||
1116 | static struct pci_board pci_boards[] __devinitdata = { | 1117 | static struct pciserial_board pci_boards[] __devinitdata = { |
1117 | [pbn_default] = { | 1118 | [pbn_default] = { |
1118 | .flags = FL_BASE0, | 1119 | .flags = FL_BASE0, |
1119 | .num_ports = 1, | 1120 | .num_ports = 1, |
@@ -1565,7 +1566,7 @@ static struct pci_board pci_boards[] __devinitdata = { | |||
1565 | * serial specs. Returns 0 on success, 1 on failure. | 1566 | * serial specs. Returns 0 on success, 1 on failure. |
1566 | */ | 1567 | */ |
1567 | static int __devinit | 1568 | static int __devinit |
1568 | serial_pci_guess_board(struct pci_dev *dev, struct pci_board *board) | 1569 | serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) |
1569 | { | 1570 | { |
1570 | int num_iomem, num_port, first_port = -1, i; | 1571 | int num_iomem, num_port, first_port = -1, i; |
1571 | 1572 | ||
@@ -1630,7 +1631,8 @@ serial_pci_guess_board(struct pci_dev *dev, struct pci_board *board) | |||
1630 | } | 1631 | } |
1631 | 1632 | ||
1632 | static inline int | 1633 | static inline int |
1633 | serial_pci_matches(struct pci_board *board, struct pci_board *guessed) | 1634 | serial_pci_matches(struct pciserial_board *board, |
1635 | struct pciserial_board *guessed) | ||
1634 | { | 1636 | { |
1635 | return | 1637 | return |
1636 | board->num_ports == guessed->num_ports && | 1638 | board->num_ports == guessed->num_ports && |
@@ -1648,7 +1650,7 @@ static int __devinit | |||
1648 | pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) | 1650 | pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) |
1649 | { | 1651 | { |
1650 | struct serial_private *priv; | 1652 | struct serial_private *priv; |
1651 | struct pci_board *board, tmp; | 1653 | struct pciserial_board *board, tmp; |
1652 | struct pci_serial_quirk *quirk; | 1654 | struct pci_serial_quirk *quirk; |
1653 | int rc, nr_ports, i; | 1655 | int rc, nr_ports, i; |
1654 | 1656 | ||
@@ -1669,7 +1671,7 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) | |||
1669 | * Use a copy of the pci_board entry for this; | 1671 | * Use a copy of the pci_board entry for this; |
1670 | * avoid changing entries in the table. | 1672 | * avoid changing entries in the table. |
1671 | */ | 1673 | */ |
1672 | memcpy(&tmp, board, sizeof(struct pci_board)); | 1674 | memcpy(&tmp, board, sizeof(struct pciserial_board)); |
1673 | board = &tmp; | 1675 | board = &tmp; |
1674 | 1676 | ||
1675 | /* | 1677 | /* |
@@ -1685,7 +1687,8 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) | |||
1685 | * detect this boards settings with our heuristic, | 1687 | * detect this boards settings with our heuristic, |
1686 | * then we no longer need this entry. | 1688 | * then we no longer need this entry. |
1687 | */ | 1689 | */ |
1688 | memcpy(&tmp, &pci_boards[pbn_default], sizeof(struct pci_board)); | 1690 | memcpy(&tmp, &pci_boards[pbn_default], |
1691 | sizeof(struct pciserial_board)); | ||
1689 | rc = serial_pci_guess_board(dev, &tmp); | 1692 | rc = serial_pci_guess_board(dev, &tmp); |
1690 | if (rc == 0 && serial_pci_matches(board, &tmp)) | 1693 | if (rc == 0 && serial_pci_matches(board, &tmp)) |
1691 | moan_device("Redundant entry in serial pci_table.", | 1694 | moan_device("Redundant entry in serial pci_table.", |