diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-18 06:06:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:27 -0400 |
commit | 6f56b658b4e5c4486641ce62f331150954c4de37 (patch) | |
tree | dc7eca7e1004647f3ef0a5c9131b058247bc80f2 /drivers/char | |
parent | 7aeb95daf37dbd72f63cdd52d86a8b5d89e59394 (diff) |
Char: moxa, function names cleanup
prepend moxa_ to all moxa functions which laxes this
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 | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 3bc8c6826cd4..40ac6dedee46 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -206,13 +206,13 @@ static int moxa_tiocmget(struct tty_struct *tty, struct file *file); | |||
206 | static int moxa_tiocmset(struct tty_struct *tty, struct file *file, | 206 | static int moxa_tiocmset(struct tty_struct *tty, struct file *file, |
207 | unsigned int set, unsigned int clear); | 207 | unsigned int set, unsigned int clear); |
208 | static void moxa_poll(unsigned long); | 208 | static void moxa_poll(unsigned long); |
209 | static void set_tty_param(struct tty_struct *); | 209 | static void moxa_set_tty_param(struct tty_struct *); |
210 | static int block_till_ready(struct tty_struct *, struct file *, | 210 | static int moxa_block_till_ready(struct tty_struct *, struct file *, |
211 | struct moxa_port *); | 211 | struct moxa_port *); |
212 | static void setup_empty_event(struct tty_struct *); | 212 | static void moxa_setup_empty_event(struct tty_struct *); |
213 | static void check_xmit_empty(unsigned long); | 213 | static void moxa_check_xmit_empty(unsigned long); |
214 | static void shut_down(struct moxa_port *); | 214 | static void moxa_shut_down(struct moxa_port *); |
215 | static void receive_data(struct moxa_port *); | 215 | static void moxa_receive_data(struct moxa_port *); |
216 | /* | 216 | /* |
217 | * moxa board interface functions: | 217 | * moxa board interface functions: |
218 | */ | 218 | */ |
@@ -376,7 +376,7 @@ static int __init moxa_init(void) | |||
376 | init_waitqueue_head(&ch->open_wait); | 376 | init_waitqueue_head(&ch->open_wait); |
377 | init_waitqueue_head(&ch->close_wait); | 377 | init_waitqueue_head(&ch->close_wait); |
378 | 378 | ||
379 | setup_timer(&ch->emptyTimer, check_xmit_empty, | 379 | setup_timer(&ch->emptyTimer, moxa_check_xmit_empty, |
380 | (unsigned long)ch); | 380 | (unsigned long)ch); |
381 | } | 381 | } |
382 | 382 | ||
@@ -499,12 +499,12 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) | |||
499 | ch->tty = tty; | 499 | ch->tty = tty; |
500 | if (!(ch->asyncflags & ASYNC_INITIALIZED)) { | 500 | if (!(ch->asyncflags & ASYNC_INITIALIZED)) { |
501 | ch->statusflags = 0; | 501 | ch->statusflags = 0; |
502 | set_tty_param(tty); | 502 | moxa_set_tty_param(tty); |
503 | MoxaPortLineCtrl(ch->port, 1, 1); | 503 | MoxaPortLineCtrl(ch->port, 1, 1); |
504 | MoxaPortEnable(ch->port); | 504 | MoxaPortEnable(ch->port); |
505 | ch->asyncflags |= ASYNC_INITIALIZED; | 505 | ch->asyncflags |= ASYNC_INITIALIZED; |
506 | } | 506 | } |
507 | retval = block_till_ready(tty, filp, ch); | 507 | retval = moxa_block_till_ready(tty, filp, ch); |
508 | 508 | ||
509 | moxa_unthrottle(tty); | 509 | moxa_unthrottle(tty); |
510 | 510 | ||
@@ -556,11 +556,11 @@ static void moxa_close(struct tty_struct *tty, struct file *filp) | |||
556 | 556 | ||
557 | ch->cflag = tty->termios->c_cflag; | 557 | ch->cflag = tty->termios->c_cflag; |
558 | if (ch->asyncflags & ASYNC_INITIALIZED) { | 558 | if (ch->asyncflags & ASYNC_INITIALIZED) { |
559 | setup_empty_event(tty); | 559 | moxa_setup_empty_event(tty); |
560 | tty_wait_until_sent(tty, 30 * HZ); /* 30 seconds timeout */ | 560 | tty_wait_until_sent(tty, 30 * HZ); /* 30 seconds timeout */ |
561 | del_timer_sync(&moxa_ports[ch->port].emptyTimer); | 561 | del_timer_sync(&moxa_ports[ch->port].emptyTimer); |
562 | } | 562 | } |
563 | shut_down(ch); | 563 | moxa_shut_down(ch); |
564 | MoxaPortFlushData(port, 2); | 564 | MoxaPortFlushData(port, 2); |
565 | 565 | ||
566 | if (tty->driver->flush_buffer) | 566 | if (tty->driver->flush_buffer) |
@@ -646,7 +646,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty) | |||
646 | * in tty_ioctl.c, etc. | 646 | * in tty_ioctl.c, etc. |
647 | */ | 647 | */ |
648 | if (!(ch->statusflags & EMPTYWAIT)) | 648 | if (!(ch->statusflags & EMPTYWAIT)) |
649 | setup_empty_event(tty); | 649 | moxa_setup_empty_event(tty); |
650 | } | 650 | } |
651 | return (chars); | 651 | return (chars); |
652 | } | 652 | } |
@@ -744,7 +744,7 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file, | |||
744 | retval = tty_check_change(tty); | 744 | retval = tty_check_change(tty); |
745 | if (retval) | 745 | if (retval) |
746 | return (retval); | 746 | return (retval); |
747 | setup_empty_event(tty); | 747 | moxa_setup_empty_event(tty); |
748 | tty_wait_until_sent(tty, 0); | 748 | tty_wait_until_sent(tty, 0); |
749 | if (!arg) | 749 | if (!arg) |
750 | MoxaPortSendBreak(ch->port, 0); | 750 | MoxaPortSendBreak(ch->port, 0); |
@@ -753,7 +753,7 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file, | |||
753 | retval = tty_check_change(tty); | 753 | retval = tty_check_change(tty); |
754 | if (retval) | 754 | if (retval) |
755 | return (retval); | 755 | return (retval); |
756 | setup_empty_event(tty); | 756 | moxa_setup_empty_event(tty); |
757 | tty_wait_until_sent(tty, 0); | 757 | tty_wait_until_sent(tty, 0); |
758 | MoxaPortSendBreak(ch->port, arg); | 758 | MoxaPortSendBreak(ch->port, arg); |
759 | return (0); | 759 | return (0); |
@@ -802,7 +802,7 @@ static void moxa_set_termios(struct tty_struct *tty, | |||
802 | 802 | ||
803 | if (ch == NULL) | 803 | if (ch == NULL) |
804 | return; | 804 | return; |
805 | set_tty_param(tty); | 805 | moxa_set_tty_param(tty); |
806 | if (!(old_termios->c_cflag & CLOCAL) && | 806 | if (!(old_termios->c_cflag & CLOCAL) && |
807 | (tty->termios->c_cflag & CLOCAL)) | 807 | (tty->termios->c_cflag & CLOCAL)) |
808 | wake_up_interruptible(&ch->open_wait); | 808 | wake_up_interruptible(&ch->open_wait); |
@@ -838,7 +838,7 @@ static void moxa_hangup(struct tty_struct *tty) | |||
838 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; | 838 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
839 | 839 | ||
840 | moxa_flush_buffer(tty); | 840 | moxa_flush_buffer(tty); |
841 | shut_down(ch); | 841 | moxa_shut_down(ch); |
842 | ch->event = 0; | 842 | ch->event = 0; |
843 | ch->count = 0; | 843 | ch->count = 0; |
844 | ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE; | 844 | ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE; |
@@ -868,7 +868,7 @@ static void moxa_poll(unsigned long ignored) | |||
868 | continue; | 868 | continue; |
869 | if (!(ch->statusflags & THROTTLE) && | 869 | if (!(ch->statusflags & THROTTLE) && |
870 | (MoxaPortRxQueue(ch->port) > 0)) | 870 | (MoxaPortRxQueue(ch->port) > 0)) |
871 | receive_data(ch); | 871 | moxa_receive_data(ch); |
872 | if ((tp = ch->tty) == 0) | 872 | if ((tp = ch->tty) == 0) |
873 | continue; | 873 | continue; |
874 | if (ch->statusflags & LOWWAIT) { | 874 | if (ch->statusflags & LOWWAIT) { |
@@ -902,7 +902,7 @@ static void moxa_poll(unsigned long ignored) | |||
902 | 902 | ||
903 | /******************************************************************************/ | 903 | /******************************************************************************/ |
904 | 904 | ||
905 | static void set_tty_param(struct tty_struct *tty) | 905 | static void moxa_set_tty_param(struct tty_struct *tty) |
906 | { | 906 | { |
907 | register struct ktermios *ts; | 907 | register struct ktermios *ts; |
908 | struct moxa_port *ch; | 908 | struct moxa_port *ch; |
@@ -927,7 +927,7 @@ static void set_tty_param(struct tty_struct *tty) | |||
927 | MoxaPortSetTermio(ch->port, ts, tty_get_baud_rate(tty)); | 927 | MoxaPortSetTermio(ch->port, ts, tty_get_baud_rate(tty)); |
928 | } | 928 | } |
929 | 929 | ||
930 | static int block_till_ready(struct tty_struct *tty, struct file *filp, | 930 | static int moxa_block_till_ready(struct tty_struct *tty, struct file *filp, |
931 | struct moxa_port *ch) | 931 | struct moxa_port *ch) |
932 | { | 932 | { |
933 | DECLARE_WAITQUEUE(wait,current); | 933 | DECLARE_WAITQUEUE(wait,current); |
@@ -1013,7 +1013,7 @@ static int block_till_ready(struct tty_struct *tty, struct file *filp, | |||
1013 | return 0; | 1013 | return 0; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | static void setup_empty_event(struct tty_struct *tty) | 1016 | static void moxa_setup_empty_event(struct tty_struct *tty) |
1017 | { | 1017 | { |
1018 | struct moxa_port *ch = tty->driver_data; | 1018 | struct moxa_port *ch = tty->driver_data; |
1019 | unsigned long flags; | 1019 | unsigned long flags; |
@@ -1024,7 +1024,7 @@ static void setup_empty_event(struct tty_struct *tty) | |||
1024 | spin_unlock_irqrestore(&moxa_lock, flags); | 1024 | spin_unlock_irqrestore(&moxa_lock, flags); |
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | static void check_xmit_empty(unsigned long data) | 1027 | static void moxa_check_xmit_empty(unsigned long data) |
1028 | { | 1028 | { |
1029 | struct moxa_port *ch; | 1029 | struct moxa_port *ch; |
1030 | 1030 | ||
@@ -1041,7 +1041,7 @@ static void check_xmit_empty(unsigned long data) | |||
1041 | ch->statusflags &= ~EMPTYWAIT; | 1041 | ch->statusflags &= ~EMPTYWAIT; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | static void shut_down(struct moxa_port *ch) | 1044 | static void moxa_shut_down(struct moxa_port *ch) |
1045 | { | 1045 | { |
1046 | struct tty_struct *tp; | 1046 | struct tty_struct *tp; |
1047 | 1047 | ||
@@ -1061,7 +1061,7 @@ static void shut_down(struct moxa_port *ch) | |||
1061 | ch->asyncflags &= ~ASYNC_INITIALIZED; | 1061 | ch->asyncflags &= ~ASYNC_INITIALIZED; |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | static void receive_data(struct moxa_port *ch) | 1064 | static void moxa_receive_data(struct moxa_port *ch) |
1065 | { | 1065 | { |
1066 | struct tty_struct *tp; | 1066 | struct tty_struct *tp; |
1067 | struct ktermios *ts; | 1067 | struct ktermios *ts; |
@@ -1395,8 +1395,8 @@ static struct mon_str moxaLog; | |||
1395 | static int moxaFuncTout = HZ / 2; | 1395 | static int moxaFuncTout = HZ / 2; |
1396 | 1396 | ||
1397 | static void moxafunc(void __iomem *, int, ushort); | 1397 | static void moxafunc(void __iomem *, int, ushort); |
1398 | static void wait_finish(void __iomem *); | 1398 | static void moxa_wait_finish(void __iomem *); |
1399 | static void low_water_check(void __iomem *); | 1399 | static void moxa_low_water_check(void __iomem *); |
1400 | static int moxaloadbios(int, unsigned char __user *, int); | 1400 | static int moxaloadbios(int, unsigned char __user *, int); |
1401 | static int moxafindcard(int); | 1401 | static int moxafindcard(int); |
1402 | static int moxaload320b(int, unsigned char __user *, int); | 1402 | static int moxaload320b(int, unsigned char __user *, int); |
@@ -1462,7 +1462,7 @@ void MoxaPortFlushData(int port, int mode) | |||
1462 | moxafunc(ofsAddr, FC_FlushQueue, mode); | 1462 | moxafunc(ofsAddr, FC_FlushQueue, mode); |
1463 | if (mode != 1) { | 1463 | if (mode != 1) { |
1464 | moxa_ports[port].lowChkFlag = 0; | 1464 | moxa_ports[port].lowChkFlag = 0; |
1465 | low_water_check(ofsAddr); | 1465 | moxa_low_water_check(ofsAddr); |
1466 | } | 1466 | } |
1467 | } | 1467 | } |
1468 | 1468 | ||
@@ -1643,7 +1643,7 @@ int MoxaDriverPoll(void) | |||
1643 | if (moxa_ports[p].lowChkFlag) { | 1643 | if (moxa_ports[p].lowChkFlag) { |
1644 | moxa_ports[p].lowChkFlag = 0; | 1644 | moxa_ports[p].lowChkFlag = 0; |
1645 | ofsAddr = moxa_ports[p].tableAddr; | 1645 | ofsAddr = moxa_ports[p].tableAddr; |
1646 | low_water_check(ofsAddr); | 1646 | moxa_low_water_check(ofsAddr); |
1647 | } | 1647 | } |
1648 | } | 1648 | } |
1649 | } | 1649 | } |
@@ -2070,7 +2070,7 @@ int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud) | |||
2070 | writeb(termio->c_cc[VSTART], ofsAddr + FuncArg); | 2070 | writeb(termio->c_cc[VSTART], ofsAddr + FuncArg); |
2071 | writeb(termio->c_cc[VSTOP], ofsAddr + FuncArg1); | 2071 | writeb(termio->c_cc[VSTOP], ofsAddr + FuncArg1); |
2072 | writeb(FC_SetXonXoff, ofsAddr + FuncCode); | 2072 | writeb(FC_SetXonXoff, ofsAddr + FuncCode); |
2073 | wait_finish(ofsAddr); | 2073 | moxa_wait_finish(ofsAddr); |
2074 | 2074 | ||
2075 | } | 2075 | } |
2076 | return (0); | 2076 | return (0); |
@@ -2469,10 +2469,10 @@ static void moxafunc(void __iomem *ofsAddr, int cmd, ushort arg) | |||
2469 | 2469 | ||
2470 | writew(arg, ofsAddr + FuncArg); | 2470 | writew(arg, ofsAddr + FuncArg); |
2471 | writew(cmd, ofsAddr + FuncCode); | 2471 | writew(cmd, ofsAddr + FuncCode); |
2472 | wait_finish(ofsAddr); | 2472 | moxa_wait_finish(ofsAddr); |
2473 | } | 2473 | } |
2474 | 2474 | ||
2475 | static void wait_finish(void __iomem *ofsAddr) | 2475 | static void moxa_wait_finish(void __iomem *ofsAddr) |
2476 | { | 2476 | { |
2477 | unsigned long i, j; | 2477 | unsigned long i, j; |
2478 | 2478 | ||
@@ -2485,7 +2485,7 @@ static void wait_finish(void __iomem *ofsAddr) | |||
2485 | } | 2485 | } |
2486 | } | 2486 | } |
2487 | 2487 | ||
2488 | static void low_water_check(void __iomem *ofsAddr) | 2488 | static void moxa_low_water_check(void __iomem *ofsAddr) |
2489 | { | 2489 | { |
2490 | int len; | 2490 | int len; |
2491 | ushort rptr, wptr, mask; | 2491 | ushort rptr, wptr, mask; |