diff options
author | Jiri Slaby <xslaby@fi.muni.cz> | 2006-01-09 23:54:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:02:00 -0500 |
commit | 8070e35c6524e0f254cd69f493c50811e8e5b856 (patch) | |
tree | c0f11f7afb656d580bf9bc6acdec4f2b541376d0 /drivers/char | |
parent | d8d16e47442a84d7fefc7ff839952ddfc919e495 (diff) |
[PATCH] char/isicom: Type conversion and variables deletion
Type which is needed to have accurate size was converted to [us]{8,16}.
Removed void * cast.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/isicom.c | 131 |
1 files changed, 61 insertions, 70 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 761c5622b7af..9ede7c211cc1 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -154,9 +154,6 @@ static struct tty_driver *isicom_normal; | |||
154 | 154 | ||
155 | static struct timer_list tx; | 155 | static struct timer_list tx; |
156 | static char re_schedule = 1; | 156 | static char re_schedule = 1; |
157 | #ifdef ISICOM_DEBUG | ||
158 | static unsigned long tx_count = 0; | ||
159 | #endif | ||
160 | 157 | ||
161 | static int ISILoad_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); | 158 | static int ISILoad_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); |
162 | 159 | ||
@@ -173,7 +170,7 @@ static signed char linuxb_to_isib[] = { | |||
173 | }; | 170 | }; |
174 | 171 | ||
175 | struct isi_board { | 172 | struct isi_board { |
176 | unsigned short base; | 173 | unsigned long base; |
177 | unsigned char irq; | 174 | unsigned char irq; |
178 | unsigned char port_count; | 175 | unsigned char port_count; |
179 | unsigned short status; | 176 | unsigned short status; |
@@ -192,9 +189,9 @@ struct isi_port { | |||
192 | int count; | 189 | int count; |
193 | int blocked_open; | 190 | int blocked_open; |
194 | int close_delay; | 191 | int close_delay; |
195 | unsigned short channel; | 192 | u16 channel; |
196 | unsigned short status; | 193 | u16 status; |
197 | unsigned short closing_wait; | 194 | u16 closing_wait; |
198 | struct isi_board * card; | 195 | struct isi_board * card; |
199 | struct tty_struct * tty; | 196 | struct tty_struct * tty; |
200 | wait_queue_head_t close_wait; | 197 | wait_queue_head_t close_wait; |
@@ -219,7 +216,7 @@ static struct isi_port isi_ports[PORT_COUNT]; | |||
219 | static int lock_card(struct isi_board *card) | 216 | static int lock_card(struct isi_board *card) |
220 | { | 217 | { |
221 | char retries; | 218 | char retries; |
222 | unsigned short base = card->base; | 219 | unsigned long base = card->base; |
223 | 220 | ||
224 | for (retries = 0; retries < 100; retries++) { | 221 | for (retries = 0; retries < 100; retries++) { |
225 | spin_lock_irqsave(&card->card_lock, card->flags); | 222 | spin_lock_irqsave(&card->card_lock, card->flags); |
@@ -230,14 +227,14 @@ static int lock_card(struct isi_board *card) | |||
230 | udelay(1000); /* 1ms */ | 227 | udelay(1000); /* 1ms */ |
231 | } | 228 | } |
232 | } | 229 | } |
233 | printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%x)\n", card->base); | 230 | printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", card->base); |
234 | return 0; /* Failed to aquire the card! */ | 231 | return 0; /* Failed to aquire the card! */ |
235 | } | 232 | } |
236 | 233 | ||
237 | static int lock_card_at_interrupt(struct isi_board *card) | 234 | static int lock_card_at_interrupt(struct isi_board *card) |
238 | { | 235 | { |
239 | unsigned char retries; | 236 | unsigned char retries; |
240 | unsigned short base = card->base; | 237 | unsigned long base = card->base; |
241 | 238 | ||
242 | for (retries = 0; retries < 200; retries++) { | 239 | for (retries = 0; retries < 200; retries++) { |
243 | spin_lock_irqsave(&card->card_lock, card->flags); | 240 | spin_lock_irqsave(&card->card_lock, card->flags); |
@@ -263,8 +260,8 @@ static void unlock_card(struct isi_board *card) | |||
263 | static void raise_dtr(struct isi_port *port) | 260 | static void raise_dtr(struct isi_port *port) |
264 | { | 261 | { |
265 | struct isi_board *card = port->card; | 262 | struct isi_board *card = port->card; |
266 | unsigned short base = card->base; | 263 | unsigned long base = card->base; |
267 | unsigned char channel = port->channel; | 264 | u16 channel = port->channel; |
268 | 265 | ||
269 | if (!lock_card(card)) | 266 | if (!lock_card(card)) |
270 | return; | 267 | return; |
@@ -279,8 +276,8 @@ static void raise_dtr(struct isi_port *port) | |||
279 | static inline void drop_dtr(struct isi_port *port) | 276 | static inline void drop_dtr(struct isi_port *port) |
280 | { | 277 | { |
281 | struct isi_board *card = port->card; | 278 | struct isi_board *card = port->card; |
282 | unsigned short base = card->base; | 279 | unsigned long base = card->base; |
283 | unsigned char channel = port->channel; | 280 | u16 channel = port->channel; |
284 | 281 | ||
285 | if (!lock_card(card)) | 282 | if (!lock_card(card)) |
286 | return; | 283 | return; |
@@ -295,8 +292,8 @@ static inline void drop_dtr(struct isi_port *port) | |||
295 | static inline void raise_rts(struct isi_port *port) | 292 | static inline void raise_rts(struct isi_port *port) |
296 | { | 293 | { |
297 | struct isi_board *card = port->card; | 294 | struct isi_board *card = port->card; |
298 | unsigned short base = card->base; | 295 | unsigned long base = card->base; |
299 | unsigned char channel = port->channel; | 296 | u16 channel = port->channel; |
300 | 297 | ||
301 | if (!lock_card(card)) | 298 | if (!lock_card(card)) |
302 | return; | 299 | return; |
@@ -310,8 +307,8 @@ static inline void raise_rts(struct isi_port *port) | |||
310 | static inline void drop_rts(struct isi_port *port) | 307 | static inline void drop_rts(struct isi_port *port) |
311 | { | 308 | { |
312 | struct isi_board *card = port->card; | 309 | struct isi_board *card = port->card; |
313 | unsigned short base = card->base; | 310 | unsigned long base = card->base; |
314 | unsigned char channel = port->channel; | 311 | u16 channel = port->channel; |
315 | 312 | ||
316 | if (!lock_card(card)) | 313 | if (!lock_card(card)) |
317 | return; | 314 | return; |
@@ -326,8 +323,8 @@ static inline void drop_rts(struct isi_port *port) | |||
326 | static inline void raise_dtr_rts(struct isi_port *port) | 323 | static inline void raise_dtr_rts(struct isi_port *port) |
327 | { | 324 | { |
328 | struct isi_board *card = port->card; | 325 | struct isi_board *card = port->card; |
329 | unsigned short base = card->base; | 326 | unsigned long base = card->base; |
330 | unsigned char channel = port->channel; | 327 | u16 channel = port->channel; |
331 | 328 | ||
332 | if (!lock_card(card)) | 329 | if (!lock_card(card)) |
333 | return; | 330 | return; |
@@ -342,8 +339,8 @@ static inline void raise_dtr_rts(struct isi_port *port) | |||
342 | static void drop_dtr_rts(struct isi_port *port) | 339 | static void drop_dtr_rts(struct isi_port *port) |
343 | { | 340 | { |
344 | struct isi_board *card = port->card; | 341 | struct isi_board *card = port->card; |
345 | unsigned short base = card->base; | 342 | unsigned long base = card->base; |
346 | unsigned char channel = port->channel; | 343 | u16 channel = port->channel; |
347 | 344 | ||
348 | if (!lock_card(card)) | 345 | if (!lock_card(card)) |
349 | return; | 346 | return; |
@@ -358,8 +355,8 @@ static void drop_dtr_rts(struct isi_port *port) | |||
358 | static inline void kill_queue(struct isi_port *port, short queue) | 355 | static inline void kill_queue(struct isi_port *port, short queue) |
359 | { | 356 | { |
360 | struct isi_board *card = port->card; | 357 | struct isi_board *card = port->card; |
361 | unsigned short base = card->base; | 358 | unsigned long base = card->base; |
362 | unsigned char channel = port->channel; | 359 | u16 channel = port->channel; |
363 | 360 | ||
364 | if (!lock_card(card)) | 361 | if (!lock_card(card)) |
365 | return; | 362 | return; |
@@ -386,7 +383,7 @@ static struct miscdevice isiloader_device = { | |||
386 | }; | 383 | }; |
387 | 384 | ||
388 | 385 | ||
389 | static inline int WaitTillCardIsFree(unsigned short base) | 386 | static inline int WaitTillCardIsFree(unsigned long base) |
390 | { | 387 | { |
391 | unsigned long count=0; | 388 | unsigned long count=0; |
392 | while( (!(inw(base+0xe) & 0x1)) && (count++ < 6000000)); | 389 | while( (!(inw(base+0xe) & 0x1)) && (count++ < 6000000)); |
@@ -400,8 +397,8 @@ static int ISILoad_ioctl(struct inode *inode, struct file *filp, | |||
400 | unsigned int cmd, unsigned long arg) | 397 | unsigned int cmd, unsigned long arg) |
401 | { | 398 | { |
402 | unsigned int card, i, j, signature, status, portcount = 0; | 399 | unsigned int card, i, j, signature, status, portcount = 0; |
403 | unsigned long t; | 400 | unsigned long t, base; |
404 | unsigned short word_count, base; | 401 | u16 word_count; |
405 | bin_frame frame; | 402 | bin_frame frame; |
406 | void __user *argp = (void __user *)arg; | 403 | void __user *argp = (void __user *)arg; |
407 | /* exec_record exec_rec; */ | 404 | /* exec_record exec_rec; */ |
@@ -421,7 +418,7 @@ static int ISILoad_ioctl(struct inode *inode, struct file *filp, | |||
421 | case MIOCTL_RESET_CARD: | 418 | case MIOCTL_RESET_CARD: |
422 | if (!capable(CAP_SYS_ADMIN)) | 419 | if (!capable(CAP_SYS_ADMIN)) |
423 | return -EPERM; | 420 | return -EPERM; |
424 | printk(KERN_DEBUG "ISILoad:Resetting Card%d at 0x%x ",card+1,base); | 421 | printk(KERN_DEBUG "ISILoad:Resetting Card%d at 0x%lx ",card+1,base); |
425 | 422 | ||
426 | inw(base+0x8); | 423 | inw(base+0x8); |
427 | 424 | ||
@@ -440,7 +437,7 @@ static int ISILoad_ioctl(struct inode *inode, struct file *filp, | |||
440 | #ifdef ISICOM_DEBUG | 437 | #ifdef ISICOM_DEBUG |
441 | printk("\nbase+0x2=0x%x , base+0xe=0x%x",inw(base+0x2),inw(base+0xe)); | 438 | printk("\nbase+0x2=0x%x , base+0xe=0x%x",inw(base+0x2),inw(base+0xe)); |
442 | #endif | 439 | #endif |
443 | printk("\nISILoad:ISA Card%d reset failure (Possible bad I/O Port Address 0x%x).\n",card+1,base); | 440 | printk("\nISILoad:ISA Card%d reset failure (Possible bad I/O Port Address 0x%lx).\n",card+1,base); |
444 | return -EIO; | 441 | return -EIO; |
445 | } | 442 | } |
446 | } | 443 | } |
@@ -450,7 +447,7 @@ static int ISILoad_ioctl(struct inode *inode, struct file *filp, | |||
450 | #ifdef ISICOM_DEBUG | 447 | #ifdef ISICOM_DEBUG |
451 | printk("\nbase+0x2=0x%x , base+0xe=0x%x",inw(base+0x2),inw(base+0xe)); | 448 | printk("\nbase+0x2=0x%x , base+0xe=0x%x",inw(base+0x2),inw(base+0xe)); |
452 | #endif | 449 | #endif |
453 | printk("\nISILoad:PCI Card%d reset failure (Possible bad I/O Port Address 0x%x).\n",card+1,base); | 450 | printk("\nISILoad:PCI Card%d reset failure (Possible bad I/O Port Address 0x%lx).\n",card+1,base); |
454 | return -EIO; | 451 | return -EIO; |
455 | } | 452 | } |
456 | } | 453 | } |
@@ -473,7 +470,7 @@ static int ISILoad_ioctl(struct inode *inode, struct file *filp, | |||
473 | isi_card[card].shift_count = 11; | 470 | isi_card[card].shift_count = 11; |
474 | break; | 471 | break; |
475 | 472 | ||
476 | default: printk("ISILoad:Card%d reset failure (Possible bad I/O Port Address 0x%x).\n",card+1,base); | 473 | default: printk("ISILoad:Card%d reset failure (Possible bad I/O Port Address 0x%lx).\n",card+1,base); |
477 | #ifdef ISICOM_DEBUG | 474 | #ifdef ISICOM_DEBUG |
478 | printk("Sig=0x%x\n",signature); | 475 | printk("Sig=0x%x\n",signature); |
479 | #endif | 476 | #endif |
@@ -636,10 +633,6 @@ static void isicom_tx(unsigned long _data) | |||
636 | struct isi_port *port; | 633 | struct isi_port *port; |
637 | struct tty_struct *tty; | 634 | struct tty_struct *tty; |
638 | 635 | ||
639 | #ifdef ISICOM_DEBUG | ||
640 | ++tx_count; | ||
641 | #endif | ||
642 | |||
643 | /* find next active board */ | 636 | /* find next active board */ |
644 | card = (prev_card + 1) & 0x0003; | 637 | card = (prev_card + 1) & 0x0003; |
645 | while(count-- > 0) { | 638 | while(count-- > 0) { |
@@ -762,19 +755,16 @@ static void isicom_bottomhalf(void *data) | |||
762 | * Main interrupt handler routine | 755 | * Main interrupt handler routine |
763 | */ | 756 | */ |
764 | 757 | ||
765 | static irqreturn_t isicom_interrupt(int irq, void *dev_id, | 758 | static irqreturn_t isicom_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
766 | struct pt_regs *regs) | ||
767 | { | 759 | { |
768 | struct isi_board *card; | 760 | struct isi_board *card = dev_id; |
769 | struct isi_port *port; | 761 | struct isi_port *port; |
770 | struct tty_struct *tty; | 762 | struct tty_struct *tty; |
771 | unsigned short base, header, word_count, count; | 763 | unsigned long base; |
772 | unsigned char channel; | 764 | u16 header, word_count, count, channel; |
773 | short byte_count; | 765 | short byte_count; |
774 | unsigned char *rp; | 766 | unsigned char *rp; |
775 | 767 | ||
776 | card = (struct isi_board *) dev_id; | ||
777 | |||
778 | if (!card || !(card->status & FIRMWARE_LOADED)) | 768 | if (!card || !(card->status & FIRMWARE_LOADED)) |
779 | return IRQ_NONE; | 769 | return IRQ_NONE; |
780 | 770 | ||
@@ -796,7 +786,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id, | |||
796 | byte_count = header & 0xff; | 786 | byte_count = header & 0xff; |
797 | 787 | ||
798 | if (channel + 1 > card->port_count) { | 788 | if (channel + 1 > card->port_count) { |
799 | printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%x): %d(channel) > port_count.\n", | 789 | printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): %d(channel) > port_count.\n", |
800 | base, channel+1); | 790 | base, channel+1); |
801 | if (card->isa) | 791 | if (card->isa) |
802 | ClearInterrupt(base); | 792 | ClearInterrupt(base); |
@@ -932,7 +922,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id, | |||
932 | byte_count -= 2; | 922 | byte_count -= 2; |
933 | } | 923 | } |
934 | if (byte_count > 0) { | 924 | if (byte_count > 0) { |
935 | printk(KERN_DEBUG "ISICOM: Intr(0x%x:%d): Flip buffer overflow! dropping bytes...\n", | 925 | printk(KERN_DEBUG "ISICOM: Intr(0x%lx:%d): Flip buffer overflow! dropping bytes...\n", |
936 | base, channel+1); | 926 | base, channel+1); |
937 | while(byte_count > 0) { /* drain out unread xtra data */ | 927 | while(byte_count > 0) { /* drain out unread xtra data */ |
938 | inw(base); | 928 | inw(base); |
@@ -953,8 +943,9 @@ static void isicom_config_port(struct isi_port *port) | |||
953 | struct isi_board *card = port->card; | 943 | struct isi_board *card = port->card; |
954 | struct tty_struct *tty; | 944 | struct tty_struct *tty; |
955 | unsigned long baud; | 945 | unsigned long baud; |
956 | unsigned short channel_setup, base = card->base; | 946 | unsigned long base = card->base; |
957 | unsigned short channel = port->channel, shift_count = card->shift_count; | 947 | u16 channel_setup, channel = port->channel, |
948 | shift_count = card->shift_count; | ||
958 | unsigned char flow_ctrl; | 949 | unsigned char flow_ctrl; |
959 | 950 | ||
960 | if (!(tty = port->tty) || !tty->termios) | 951 | if (!(tty = port->tty) || !tty->termios) |
@@ -1280,7 +1271,7 @@ static void isicom_shutdown_port(struct isi_port *port) | |||
1280 | set_bit(TTY_IO_ERROR, &tty->flags); | 1271 | set_bit(TTY_IO_ERROR, &tty->flags); |
1281 | 1272 | ||
1282 | if (--card->count < 0) { | 1273 | if (--card->count < 0) { |
1283 | printk(KERN_DEBUG "ISICOM: isicom_shutdown_port: bad board(0x%x) count %d.\n", | 1274 | printk(KERN_DEBUG "ISICOM: isicom_shutdown_port: bad board(0x%lx) count %d.\n", |
1284 | card->base, card->count); | 1275 | card->base, card->count); |
1285 | card->count = 0; | 1276 | card->count = 0; |
1286 | } | 1277 | } |
@@ -1294,7 +1285,7 @@ static void isicom_shutdown_port(struct isi_port *port) | |||
1294 | 1285 | ||
1295 | static void isicom_close(struct tty_struct *tty, struct file *filp) | 1286 | static void isicom_close(struct tty_struct *tty, struct file *filp) |
1296 | { | 1287 | { |
1297 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1288 | struct isi_port *port = tty->driver_data; |
1298 | struct isi_board *card = port->card; | 1289 | struct isi_board *card = port->card; |
1299 | unsigned long flags; | 1290 | unsigned long flags; |
1300 | 1291 | ||
@@ -1314,13 +1305,13 @@ static void isicom_close(struct tty_struct *tty, struct file *filp) | |||
1314 | } | 1305 | } |
1315 | 1306 | ||
1316 | if (tty->count == 1 && port->count != 1) { | 1307 | if (tty->count == 1 && port->count != 1) { |
1317 | printk(KERN_WARNING "ISICOM:(0x%x) isicom_close: bad port count" | 1308 | printk(KERN_WARNING "ISICOM:(0x%lx) isicom_close: bad port count" |
1318 | "tty->count = 1 port count = %d.\n", | 1309 | "tty->count = 1 port count = %d.\n", |
1319 | card->base, port->count); | 1310 | card->base, port->count); |
1320 | port->count = 1; | 1311 | port->count = 1; |
1321 | } | 1312 | } |
1322 | if (--port->count < 0) { | 1313 | if (--port->count < 0) { |
1323 | printk(KERN_WARNING "ISICOM:(0x%x) isicom_close: bad port count for" | 1314 | printk(KERN_WARNING "ISICOM:(0x%lx) isicom_close: bad port count for" |
1324 | "channel%d = %d", card->base, port->channel, | 1315 | "channel%d = %d", card->base, port->channel, |
1325 | port->count); | 1316 | port->count); |
1326 | port->count = 0; | 1317 | port->count = 0; |
@@ -1373,7 +1364,7 @@ static void isicom_close(struct tty_struct *tty, struct file *filp) | |||
1373 | static int isicom_write(struct tty_struct *tty, const unsigned char *buf, | 1364 | static int isicom_write(struct tty_struct *tty, const unsigned char *buf, |
1374 | int count) | 1365 | int count) |
1375 | { | 1366 | { |
1376 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1367 | struct isi_port *port = tty->driver_data; |
1377 | struct isi_board *card = port->card; | 1368 | struct isi_board *card = port->card; |
1378 | unsigned long flags; | 1369 | unsigned long flags; |
1379 | int cnt, total = 0; | 1370 | int cnt, total = 0; |
@@ -1408,7 +1399,7 @@ static int isicom_write(struct tty_struct *tty, const unsigned char *buf, | |||
1408 | /* put_char et all */ | 1399 | /* put_char et all */ |
1409 | static void isicom_put_char(struct tty_struct *tty, unsigned char ch) | 1400 | static void isicom_put_char(struct tty_struct *tty, unsigned char ch) |
1410 | { | 1401 | { |
1411 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1402 | struct isi_port *port = tty->driver_data; |
1412 | struct isi_board *card = port->card; | 1403 | struct isi_board *card = port->card; |
1413 | unsigned long flags; | 1404 | unsigned long flags; |
1414 | 1405 | ||
@@ -1433,7 +1424,7 @@ static void isicom_put_char(struct tty_struct *tty, unsigned char ch) | |||
1433 | /* flush_chars et all */ | 1424 | /* flush_chars et all */ |
1434 | static void isicom_flush_chars(struct tty_struct *tty) | 1425 | static void isicom_flush_chars(struct tty_struct *tty) |
1435 | { | 1426 | { |
1436 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1427 | struct isi_port *port = tty->driver_data; |
1437 | 1428 | ||
1438 | if (isicom_paranoia_check(port, tty->name, "isicom_flush_chars")) | 1429 | if (isicom_paranoia_check(port, tty->name, "isicom_flush_chars")) |
1439 | return; | 1430 | return; |
@@ -1449,7 +1440,7 @@ static void isicom_flush_chars(struct tty_struct *tty) | |||
1449 | /* write_room et all */ | 1440 | /* write_room et all */ |
1450 | static int isicom_write_room(struct tty_struct *tty) | 1441 | static int isicom_write_room(struct tty_struct *tty) |
1451 | { | 1442 | { |
1452 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1443 | struct isi_port *port = tty->driver_data; |
1453 | int free; | 1444 | int free; |
1454 | 1445 | ||
1455 | if (isicom_paranoia_check(port, tty->name, "isicom_write_room")) | 1446 | if (isicom_paranoia_check(port, tty->name, "isicom_write_room")) |
@@ -1464,7 +1455,7 @@ static int isicom_write_room(struct tty_struct *tty) | |||
1464 | /* chars_in_buffer et all */ | 1455 | /* chars_in_buffer et all */ |
1465 | static int isicom_chars_in_buffer(struct tty_struct *tty) | 1456 | static int isicom_chars_in_buffer(struct tty_struct *tty) |
1466 | { | 1457 | { |
1467 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1458 | struct isi_port *port = tty->driver_data; |
1468 | if (isicom_paranoia_check(port, tty->name, "isicom_chars_in_buffer")) | 1459 | if (isicom_paranoia_check(port, tty->name, "isicom_chars_in_buffer")) |
1469 | return 0; | 1460 | return 0; |
1470 | return port->xmit_cnt; | 1461 | return port->xmit_cnt; |
@@ -1474,7 +1465,7 @@ static int isicom_chars_in_buffer(struct tty_struct *tty) | |||
1474 | static inline void isicom_send_break(struct isi_port *port, unsigned long length) | 1465 | static inline void isicom_send_break(struct isi_port *port, unsigned long length) |
1475 | { | 1466 | { |
1476 | struct isi_board *card = port->card; | 1467 | struct isi_board *card = port->card; |
1477 | unsigned short base = card->base; | 1468 | unsigned long base = card->base; |
1478 | 1469 | ||
1479 | if (!lock_card(card)) | 1470 | if (!lock_card(card)) |
1480 | return; | 1471 | return; |
@@ -1489,9 +1480,9 @@ static inline void isicom_send_break(struct isi_port *port, unsigned long length | |||
1489 | 1480 | ||
1490 | static int isicom_tiocmget(struct tty_struct *tty, struct file *file) | 1481 | static int isicom_tiocmget(struct tty_struct *tty, struct file *file) |
1491 | { | 1482 | { |
1492 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1483 | struct isi_port *port = tty->driver_data; |
1493 | /* just send the port status */ | 1484 | /* just send the port status */ |
1494 | unsigned short status = port->status; | 1485 | u16 status = port->status; |
1495 | 1486 | ||
1496 | if (isicom_paranoia_check(port, tty->name, "isicom_ioctl")) | 1487 | if (isicom_paranoia_check(port, tty->name, "isicom_ioctl")) |
1497 | return -ENODEV; | 1488 | return -ENODEV; |
@@ -1507,7 +1498,7 @@ static int isicom_tiocmget(struct tty_struct *tty, struct file *file) | |||
1507 | static int isicom_tiocmset(struct tty_struct *tty, struct file *file, | 1498 | static int isicom_tiocmset(struct tty_struct *tty, struct file *file, |
1508 | unsigned int set, unsigned int clear) | 1499 | unsigned int set, unsigned int clear) |
1509 | { | 1500 | { |
1510 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1501 | struct isi_port *port = tty->driver_data; |
1511 | 1502 | ||
1512 | if (isicom_paranoia_check(port, tty->name, "isicom_ioctl")) | 1503 | if (isicom_paranoia_check(port, tty->name, "isicom_ioctl")) |
1513 | return -ENODEV; | 1504 | return -ENODEV; |
@@ -1580,7 +1571,7 @@ static int isicom_get_serial_info(struct isi_port *port, | |||
1580 | static int isicom_ioctl(struct tty_struct *tty, struct file *filp, | 1571 | static int isicom_ioctl(struct tty_struct *tty, struct file *filp, |
1581 | unsigned int cmd, unsigned long arg) | 1572 | unsigned int cmd, unsigned long arg) |
1582 | { | 1573 | { |
1583 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1574 | struct isi_port *port = tty->driver_data; |
1584 | void __user *argp = (void __user *)arg; | 1575 | void __user *argp = (void __user *)arg; |
1585 | int retval; | 1576 | int retval; |
1586 | 1577 | ||
@@ -1632,7 +1623,7 @@ static int isicom_ioctl(struct tty_struct *tty, struct file *filp, | |||
1632 | static void isicom_set_termios(struct tty_struct *tty, | 1623 | static void isicom_set_termios(struct tty_struct *tty, |
1633 | struct termios *old_termios) | 1624 | struct termios *old_termios) |
1634 | { | 1625 | { |
1635 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1626 | struct isi_port *port = tty->driver_data; |
1636 | 1627 | ||
1637 | if (isicom_paranoia_check(port, tty->name, "isicom_set_termios")) | 1628 | if (isicom_paranoia_check(port, tty->name, "isicom_set_termios")) |
1638 | return; | 1629 | return; |
@@ -1653,7 +1644,7 @@ static void isicom_set_termios(struct tty_struct *tty, | |||
1653 | /* throttle et all */ | 1644 | /* throttle et all */ |
1654 | static void isicom_throttle(struct tty_struct *tty) | 1645 | static void isicom_throttle(struct tty_struct *tty) |
1655 | { | 1646 | { |
1656 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1647 | struct isi_port *port = tty->driver_data; |
1657 | struct isi_board *card = port->card; | 1648 | struct isi_board *card = port->card; |
1658 | 1649 | ||
1659 | if (isicom_paranoia_check(port, tty->name, "isicom_throttle")) | 1650 | if (isicom_paranoia_check(port, tty->name, "isicom_throttle")) |
@@ -1667,7 +1658,7 @@ static void isicom_throttle(struct tty_struct *tty) | |||
1667 | /* unthrottle et all */ | 1658 | /* unthrottle et all */ |
1668 | static void isicom_unthrottle(struct tty_struct *tty) | 1659 | static void isicom_unthrottle(struct tty_struct *tty) |
1669 | { | 1660 | { |
1670 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1661 | struct isi_port *port = tty->driver_data; |
1671 | struct isi_board *card = port->card; | 1662 | struct isi_board *card = port->card; |
1672 | 1663 | ||
1673 | if (isicom_paranoia_check(port, tty->name, "isicom_unthrottle")) | 1664 | if (isicom_paranoia_check(port, tty->name, "isicom_unthrottle")) |
@@ -1681,7 +1672,7 @@ static void isicom_unthrottle(struct tty_struct *tty) | |||
1681 | /* stop et all */ | 1672 | /* stop et all */ |
1682 | static void isicom_stop(struct tty_struct *tty) | 1673 | static void isicom_stop(struct tty_struct *tty) |
1683 | { | 1674 | { |
1684 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1675 | struct isi_port *port = tty->driver_data; |
1685 | 1676 | ||
1686 | if (isicom_paranoia_check(port, tty->name, "isicom_stop")) | 1677 | if (isicom_paranoia_check(port, tty->name, "isicom_stop")) |
1687 | return; | 1678 | return; |
@@ -1694,7 +1685,7 @@ static void isicom_stop(struct tty_struct *tty) | |||
1694 | /* start et all */ | 1685 | /* start et all */ |
1695 | static void isicom_start(struct tty_struct *tty) | 1686 | static void isicom_start(struct tty_struct *tty) |
1696 | { | 1687 | { |
1697 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1688 | struct isi_port *port = tty->driver_data; |
1698 | 1689 | ||
1699 | if (isicom_paranoia_check(port, tty->name, "isicom_start")) | 1690 | if (isicom_paranoia_check(port, tty->name, "isicom_start")) |
1700 | return; | 1691 | return; |
@@ -1707,7 +1698,7 @@ static void isicom_start(struct tty_struct *tty) | |||
1707 | /* hangup et all */ | 1698 | /* hangup et all */ |
1708 | static void do_isicom_hangup(void *data) | 1699 | static void do_isicom_hangup(void *data) |
1709 | { | 1700 | { |
1710 | struct isi_port *port = (struct isi_port *) data; | 1701 | struct isi_port *port = data; |
1711 | struct tty_struct *tty; | 1702 | struct tty_struct *tty; |
1712 | 1703 | ||
1713 | tty = port->tty; | 1704 | tty = port->tty; |
@@ -1717,7 +1708,7 @@ static void do_isicom_hangup(void *data) | |||
1717 | 1708 | ||
1718 | static void isicom_hangup(struct tty_struct *tty) | 1709 | static void isicom_hangup(struct tty_struct *tty) |
1719 | { | 1710 | { |
1720 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1711 | struct isi_port *port = tty->driver_data; |
1721 | 1712 | ||
1722 | if (isicom_paranoia_check(port, tty->name, "isicom_hangup")) | 1713 | if (isicom_paranoia_check(port, tty->name, "isicom_hangup")) |
1723 | return; | 1714 | return; |
@@ -1732,7 +1723,7 @@ static void isicom_hangup(struct tty_struct *tty) | |||
1732 | /* flush_buffer et all */ | 1723 | /* flush_buffer et all */ |
1733 | static void isicom_flush_buffer(struct tty_struct *tty) | 1724 | static void isicom_flush_buffer(struct tty_struct *tty) |
1734 | { | 1725 | { |
1735 | struct isi_port *port = (struct isi_port *) tty->driver_data; | 1726 | struct isi_port *port = tty->driver_data; |
1736 | struct isi_board *card = port->card; | 1727 | struct isi_board *card = port->card; |
1737 | unsigned long flags; | 1728 | unsigned long flags; |
1738 | 1729 | ||
@@ -1754,7 +1745,7 @@ static int __devinit register_ioregion(void) | |||
1754 | for (count=0; count < BOARD_COUNT; count++ ) { | 1745 | for (count=0; count < BOARD_COUNT; count++ ) { |
1755 | if (isi_card[count].base) | 1746 | if (isi_card[count].base) |
1756 | if (!request_region(isi_card[count].base,16,ISICOM_NAME)) { | 1747 | if (!request_region(isi_card[count].base,16,ISICOM_NAME)) { |
1757 | printk(KERN_DEBUG "ISICOM: I/O Region 0x%x-0x%x is busy. Card%d will be disabled.\n", | 1748 | printk(KERN_DEBUG "ISICOM: I/O Region 0x%lx-0x%lx is busy. Card%d will be disabled.\n", |
1758 | isi_card[count].base,isi_card[count].base+15,count+1); | 1749 | isi_card[count].base,isi_card[count].base+15,count+1); |
1759 | isi_card[count].base=0; | 1750 | isi_card[count].base=0; |
1760 | done++; | 1751 | done++; |
@@ -1770,7 +1761,7 @@ static void unregister_ioregion(void) | |||
1770 | if (isi_card[count].base) { | 1761 | if (isi_card[count].base) { |
1771 | release_region(isi_card[count].base,16); | 1762 | release_region(isi_card[count].base,16); |
1772 | #ifdef ISICOM_DEBUG | 1763 | #ifdef ISICOM_DEBUG |
1773 | printk(KERN_DEBUG "ISICOM: I/O Region 0x%x-0x%x released for Card%d.\n",isi_card[count].base,isi_card[count].base+15,count+1); | 1764 | printk(KERN_DEBUG "ISICOM: I/O Region 0x%lx-0x%lx released for Card%d.\n",isi_card[count].base,isi_card[count].base+15,count+1); |
1774 | #endif | 1765 | #endif |
1775 | } | 1766 | } |
1776 | } | 1767 | } |