aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-10 04:45:33 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:30 -0500
commit889074ee0be9cc6c2a698d95db4d0927485ec139 (patch)
treeccf0018c2a4413e6697e567ddde4499ad07b8f7f /drivers/char
parentc251ae0d7514563c7fdace0d390175454761228b (diff)
[PATCH] Char: moxa, remove moxa_pci_devinfo
Nothing is used from this struct but *pdev. Remove it and store only pdev. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/moxa.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 9eb8fa6dd168..2899beafeb0f 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -102,18 +102,12 @@ static struct moxa_isa_board_conf moxa_isa_boards[] =
102/* {MOXA_BOARD_C218_ISA,8,0xDC000}, */ 102/* {MOXA_BOARD_C218_ISA,8,0xDC000}, */
103}; 103};
104 104
105struct moxa_pci_devinfo {
106 ushort busNum;
107 ushort devNum;
108 struct pci_dev *pdev;
109};
110
111struct moxa_board_conf { 105struct moxa_board_conf {
112 int boardType; 106 int boardType;
113 int numPorts; 107 int numPorts;
114 unsigned long baseAddr; 108 unsigned long baseAddr;
115 int busType; 109 int busType;
116 struct moxa_pci_devinfo pciInfo; 110 struct pci_dev *pdev;
117}; 111};
118 112
119static struct moxa_board_conf moxa_boards[MAX_BOARDS]; 113static struct moxa_board_conf moxa_boards[MAX_BOARDS];
@@ -284,11 +278,8 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type,
284 break; 278 break;
285 } 279 }
286 board->busType = MOXA_BUS_TYPE_PCI; 280 board->busType = MOXA_BUS_TYPE_PCI;
287 board->pciInfo.busNum = p->bus->number;
288 board->pciInfo.devNum = p->devfn >> 3;
289 board->pciInfo.pdev = p;
290 /* don't lose the reference in the next pci_get_device iteration */ 281 /* don't lose the reference in the next pci_get_device iteration */
291 pci_dev_get(p); 282 board->pdev = pci_dev_get(p);
292 283
293 return (0); 284 return (0);
294} 285}
@@ -437,7 +428,7 @@ static void __exit moxa_exit(void)
437 if (moxaBaseAddr[i]) 428 if (moxaBaseAddr[i])
438 iounmap(moxaBaseAddr[i]); 429 iounmap(moxaBaseAddr[i]);
439 if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI) 430 if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI)
440 pci_dev_put(moxa_boards[i].pciInfo.pdev); 431 pci_dev_put(moxa_boards[i].pdev);
441 } 432 }
442 433
443 if (verbose) 434 if (verbose)