diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-02-10 04:45:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:30 -0500 |
commit | 9dff89cd82af7bccc706fed288b1c33a51c3b937 (patch) | |
tree | 8cdf2c5ab65a7cb6e279f9f996d192654c3dc19c /drivers/char | |
parent | 5ebb4078af0dab866fdf57f84f72b9e9a7e8c6b8 (diff) |
[PATCH] Char: moxa, eliminate typedefs
Do not use typedefs, use directly struct <something> instead.
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.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index a0eb088b75b0..42de5bf5be58 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -94,32 +94,32 @@ static struct pci_device_id moxa_pcibrds[] = { | |||
94 | MODULE_DEVICE_TABLE(pci, moxa_pcibrds); | 94 | MODULE_DEVICE_TABLE(pci, moxa_pcibrds); |
95 | #endif /* CONFIG_PCI */ | 95 | #endif /* CONFIG_PCI */ |
96 | 96 | ||
97 | typedef struct _moxa_isa_board_conf { | 97 | struct moxa_isa_board_conf { |
98 | int boardType; | 98 | int boardType; |
99 | int numPorts; | 99 | int numPorts; |
100 | unsigned long baseAddr; | 100 | unsigned long baseAddr; |
101 | } moxa_isa_board_conf; | 101 | }; |
102 | 102 | ||
103 | static moxa_isa_board_conf moxa_isa_boards[] = | 103 | static struct moxa_isa_board_conf moxa_isa_boards[] = |
104 | { | 104 | { |
105 | /* {MOXA_BOARD_C218_ISA,8,0xDC000}, */ | 105 | /* {MOXA_BOARD_C218_ISA,8,0xDC000}, */ |
106 | }; | 106 | }; |
107 | 107 | ||
108 | typedef struct _moxa_pci_devinfo { | 108 | struct moxa_pci_devinfo { |
109 | ushort busNum; | 109 | ushort busNum; |
110 | ushort devNum; | 110 | ushort devNum; |
111 | struct pci_dev *pdev; | 111 | struct pci_dev *pdev; |
112 | } moxa_pci_devinfo; | 112 | }; |
113 | 113 | ||
114 | typedef struct _moxa_board_conf { | 114 | struct moxa_board_conf { |
115 | int boardType; | 115 | int boardType; |
116 | int numPorts; | 116 | int numPorts; |
117 | unsigned long baseAddr; | 117 | unsigned long baseAddr; |
118 | int busType; | 118 | int busType; |
119 | moxa_pci_devinfo pciInfo; | 119 | struct moxa_pci_devinfo pciInfo; |
120 | } moxa_board_conf; | 120 | }; |
121 | 121 | ||
122 | static moxa_board_conf moxa_boards[MAX_BOARDS]; | 122 | static struct moxa_board_conf moxa_boards[MAX_BOARDS]; |
123 | static void __iomem *moxaBaseAddr[MAX_BOARDS]; | 123 | static void __iomem *moxaBaseAddr[MAX_BOARDS]; |
124 | static int loadstat[MAX_BOARDS]; | 124 | static int loadstat[MAX_BOARDS]; |
125 | 125 | ||
@@ -273,7 +273,8 @@ static struct timer_list moxaEmptyTimer[MAX_PORTS]; | |||
273 | static DEFINE_SPINLOCK(moxa_lock); | 273 | static DEFINE_SPINLOCK(moxa_lock); |
274 | 274 | ||
275 | #ifdef CONFIG_PCI | 275 | #ifdef CONFIG_PCI |
276 | static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board) | 276 | static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, |
277 | struct moxa_board_conf *board) | ||
277 | { | 278 | { |
278 | board->baseAddr = pci_resource_start (p, 2); | 279 | board->baseAddr = pci_resource_start (p, 2); |
279 | board->boardType = board_type; | 280 | board->boardType = board_type; |
@@ -1369,7 +1370,6 @@ struct mon_str { | |||
1369 | int rxcnt[MAX_PORTS]; | 1370 | int rxcnt[MAX_PORTS]; |
1370 | int txcnt[MAX_PORTS]; | 1371 | int txcnt[MAX_PORTS]; |
1371 | }; | 1372 | }; |
1372 | typedef struct mon_str mon_st; | ||
1373 | 1373 | ||
1374 | #define DCD_changed 0x01 | 1374 | #define DCD_changed 0x01 |
1375 | #define DCD_oldstate 0x80 | 1375 | #define DCD_oldstate 0x80 |
@@ -1386,7 +1386,7 @@ static char moxaDCDState[MAX_PORTS]; | |||
1386 | static char moxaLowChkFlag[MAX_PORTS]; | 1386 | static char moxaLowChkFlag[MAX_PORTS]; |
1387 | static int moxaLowWaterChk; | 1387 | static int moxaLowWaterChk; |
1388 | static int moxaCard; | 1388 | static int moxaCard; |
1389 | static mon_st moxaLog; | 1389 | static struct mon_str moxaLog; |
1390 | static int moxaFuncTout = HZ / 2; | 1390 | static int moxaFuncTout = HZ / 2; |
1391 | static ushort moxaBreakCnt[MAX_PORTS]; | 1391 | static ushort moxaBreakCnt[MAX_PORTS]; |
1392 | 1392 | ||
@@ -1485,7 +1485,8 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1485 | } | 1485 | } |
1486 | switch (cmd) { | 1486 | switch (cmd) { |
1487 | case MOXA_GET_CONF: | 1487 | case MOXA_GET_CONF: |
1488 | if(copy_to_user(argp, &moxa_boards, MAX_BOARDS * sizeof(moxa_board_conf))) | 1488 | if(copy_to_user(argp, &moxa_boards, MAX_BOARDS * |
1489 | sizeof(struct moxa_board_conf))) | ||
1489 | return -EFAULT; | 1490 | return -EFAULT; |
1490 | return (0); | 1491 | return (0); |
1491 | case MOXA_INIT_DRIVER: | 1492 | case MOXA_INIT_DRIVER: |
@@ -1494,7 +1495,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1494 | return (0); | 1495 | return (0); |
1495 | case MOXA_GETDATACOUNT: | 1496 | case MOXA_GETDATACOUNT: |
1496 | moxaLog.tick = jiffies; | 1497 | moxaLog.tick = jiffies; |
1497 | if(copy_to_user(argp, &moxaLog, sizeof(mon_st))) | 1498 | if(copy_to_user(argp, &moxaLog, sizeof(struct mon_str))) |
1498 | return -EFAULT; | 1499 | return -EFAULT; |
1499 | return (0); | 1500 | return (0); |
1500 | case MOXA_FLUSH_QUEUE: | 1501 | case MOXA_FLUSH_QUEUE: |