aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-10 04:45:30 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:30 -0500
commit9dff89cd82af7bccc706fed288b1c33a51c3b937 (patch)
tree8cdf2c5ab65a7cb6e279f9f996d192654c3dc19c /drivers/char/moxa.c
parent5ebb4078af0dab866fdf57f84f72b9e9a7e8c6b8 (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/moxa.c')
-rw-r--r--drivers/char/moxa.c29
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[] = {
94MODULE_DEVICE_TABLE(pci, moxa_pcibrds); 94MODULE_DEVICE_TABLE(pci, moxa_pcibrds);
95#endif /* CONFIG_PCI */ 95#endif /* CONFIG_PCI */
96 96
97typedef struct _moxa_isa_board_conf { 97struct 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
103static moxa_isa_board_conf moxa_isa_boards[] = 103static 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
108typedef struct _moxa_pci_devinfo { 108struct 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
114typedef struct _moxa_board_conf { 114struct 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
122static moxa_board_conf moxa_boards[MAX_BOARDS]; 122static struct moxa_board_conf moxa_boards[MAX_BOARDS];
123static void __iomem *moxaBaseAddr[MAX_BOARDS]; 123static void __iomem *moxaBaseAddr[MAX_BOARDS];
124static int loadstat[MAX_BOARDS]; 124static int loadstat[MAX_BOARDS];
125 125
@@ -273,7 +273,8 @@ static struct timer_list moxaEmptyTimer[MAX_PORTS];
273static DEFINE_SPINLOCK(moxa_lock); 273static DEFINE_SPINLOCK(moxa_lock);
274 274
275#ifdef CONFIG_PCI 275#ifdef CONFIG_PCI
276static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board) 276static 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};
1372typedef 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];
1386static char moxaLowChkFlag[MAX_PORTS]; 1386static char moxaLowChkFlag[MAX_PORTS];
1387static int moxaLowWaterChk; 1387static int moxaLowWaterChk;
1388static int moxaCard; 1388static int moxaCard;
1389static mon_st moxaLog; 1389static struct mon_str moxaLog;
1390static int moxaFuncTout = HZ / 2; 1390static int moxaFuncTout = HZ / 2;
1391static ushort moxaBreakCnt[MAX_PORTS]; 1391static 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: