diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2006-06-25 08:47:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:08 -0400 |
commit | 56e139f62bd7b82430cfcf01fcbd42e1d84fb738 (patch) | |
tree | e29ec21f9d8be0426b754dc1523a4abd7eb489a6 /drivers/char/mxser.c | |
parent | d2e5b13c4a7c68fdbcf389c9fffc12cfa2c185af (diff) |
[PATCH] moxa: remove pointless casts
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 0fb2fb9fb024..5ddbd5b2a4c1 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -877,7 +877,7 @@ static int mxser_init(void) | |||
877 | 877 | ||
878 | static void mxser_do_softint(void *private_) | 878 | static void mxser_do_softint(void *private_) |
879 | { | 879 | { |
880 | struct mxser_struct *info = (struct mxser_struct *) private_; | 880 | struct mxser_struct *info = private_; |
881 | struct tty_struct *tty; | 881 | struct tty_struct *tty; |
882 | 882 | ||
883 | tty = info->tty; | 883 | tty = info->tty; |
@@ -972,7 +972,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) | |||
972 | */ | 972 | */ |
973 | static void mxser_close(struct tty_struct *tty, struct file *filp) | 973 | static void mxser_close(struct tty_struct *tty, struct file *filp) |
974 | { | 974 | { |
975 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 975 | struct mxser_struct *info = tty->driver_data; |
976 | 976 | ||
977 | unsigned long timeout; | 977 | unsigned long timeout; |
978 | unsigned long flags; | 978 | unsigned long flags; |
@@ -1078,7 +1078,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) | |||
1078 | static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) | 1078 | static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) |
1079 | { | 1079 | { |
1080 | int c, total = 0; | 1080 | int c, total = 0; |
1081 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1081 | struct mxser_struct *info = tty->driver_data; |
1082 | unsigned long flags; | 1082 | unsigned long flags; |
1083 | 1083 | ||
1084 | if (!tty || !info->xmit_buf) | 1084 | if (!tty || !info->xmit_buf) |
@@ -1114,7 +1114,7 @@ static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int cou | |||
1114 | 1114 | ||
1115 | static void mxser_put_char(struct tty_struct *tty, unsigned char ch) | 1115 | static void mxser_put_char(struct tty_struct *tty, unsigned char ch) |
1116 | { | 1116 | { |
1117 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1117 | struct mxser_struct *info = tty->driver_data; |
1118 | unsigned long flags; | 1118 | unsigned long flags; |
1119 | 1119 | ||
1120 | if (!tty || !info->xmit_buf) | 1120 | if (!tty || !info->xmit_buf) |
@@ -1141,7 +1141,7 @@ static void mxser_put_char(struct tty_struct *tty, unsigned char ch) | |||
1141 | 1141 | ||
1142 | static void mxser_flush_chars(struct tty_struct *tty) | 1142 | static void mxser_flush_chars(struct tty_struct *tty) |
1143 | { | 1143 | { |
1144 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1144 | struct mxser_struct *info = tty->driver_data; |
1145 | unsigned long flags; | 1145 | unsigned long flags; |
1146 | 1146 | ||
1147 | if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf || (tty->hw_stopped && (info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag))) | 1147 | if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf || (tty->hw_stopped && (info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag))) |
@@ -1157,7 +1157,7 @@ static void mxser_flush_chars(struct tty_struct *tty) | |||
1157 | 1157 | ||
1158 | static int mxser_write_room(struct tty_struct *tty) | 1158 | static int mxser_write_room(struct tty_struct *tty) |
1159 | { | 1159 | { |
1160 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1160 | struct mxser_struct *info = tty->driver_data; |
1161 | int ret; | 1161 | int ret; |
1162 | 1162 | ||
1163 | ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1; | 1163 | ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1; |
@@ -1168,13 +1168,13 @@ static int mxser_write_room(struct tty_struct *tty) | |||
1168 | 1168 | ||
1169 | static int mxser_chars_in_buffer(struct tty_struct *tty) | 1169 | static int mxser_chars_in_buffer(struct tty_struct *tty) |
1170 | { | 1170 | { |
1171 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1171 | struct mxser_struct *info = tty->driver_data; |
1172 | return info->xmit_cnt; | 1172 | return info->xmit_cnt; |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | static void mxser_flush_buffer(struct tty_struct *tty) | 1175 | static void mxser_flush_buffer(struct tty_struct *tty) |
1176 | { | 1176 | { |
1177 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1177 | struct mxser_struct *info = tty->driver_data; |
1178 | char fcr; | 1178 | char fcr; |
1179 | unsigned long flags; | 1179 | unsigned long flags; |
1180 | 1180 | ||
@@ -1197,7 +1197,7 @@ static void mxser_flush_buffer(struct tty_struct *tty) | |||
1197 | 1197 | ||
1198 | static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) | 1198 | static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
1199 | { | 1199 | { |
1200 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1200 | struct mxser_struct *info = tty->driver_data; |
1201 | int retval; | 1201 | int retval; |
1202 | struct async_icount cprev, cnow; /* kernel counter temps */ | 1202 | struct async_icount cprev, cnow; /* kernel counter temps */ |
1203 | struct serial_icounter_struct __user *p_cuser; | 1203 | struct serial_icounter_struct __user *p_cuser; |
@@ -1581,7 +1581,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) | |||
1581 | 1581 | ||
1582 | static void mxser_stoprx(struct tty_struct *tty) | 1582 | static void mxser_stoprx(struct tty_struct *tty) |
1583 | { | 1583 | { |
1584 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1584 | struct mxser_struct *info = tty->driver_data; |
1585 | //unsigned long flags; | 1585 | //unsigned long flags; |
1586 | 1586 | ||
1587 | 1587 | ||
@@ -1615,7 +1615,7 @@ static void mxser_stoprx(struct tty_struct *tty) | |||
1615 | 1615 | ||
1616 | static void mxser_startrx(struct tty_struct *tty) | 1616 | static void mxser_startrx(struct tty_struct *tty) |
1617 | { | 1617 | { |
1618 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1618 | struct mxser_struct *info = tty->driver_data; |
1619 | //unsigned long flags; | 1619 | //unsigned long flags; |
1620 | 1620 | ||
1621 | info->ldisc_stop_rx = 0; | 1621 | info->ldisc_stop_rx = 0; |
@@ -1656,7 +1656,7 @@ static void mxser_startrx(struct tty_struct *tty) | |||
1656 | */ | 1656 | */ |
1657 | static void mxser_throttle(struct tty_struct *tty) | 1657 | static void mxser_throttle(struct tty_struct *tty) |
1658 | { | 1658 | { |
1659 | //struct mxser_struct *info = (struct mxser_struct *)tty->driver_data; | 1659 | //struct mxser_struct *info = tty->driver_data; |
1660 | //unsigned long flags; | 1660 | //unsigned long flags; |
1661 | //MX_LOCK(&info->slock); | 1661 | //MX_LOCK(&info->slock); |
1662 | mxser_stoprx(tty); | 1662 | mxser_stoprx(tty); |
@@ -1665,7 +1665,7 @@ static void mxser_throttle(struct tty_struct *tty) | |||
1665 | 1665 | ||
1666 | static void mxser_unthrottle(struct tty_struct *tty) | 1666 | static void mxser_unthrottle(struct tty_struct *tty) |
1667 | { | 1667 | { |
1668 | //struct mxser_struct *info = (struct mxser_struct *)tty->driver_data; | 1668 | //struct mxser_struct *info = tty->driver_data; |
1669 | //unsigned long flags; | 1669 | //unsigned long flags; |
1670 | //MX_LOCK(&info->slock); | 1670 | //MX_LOCK(&info->slock); |
1671 | mxser_startrx(tty); | 1671 | mxser_startrx(tty); |
@@ -1674,7 +1674,7 @@ static void mxser_unthrottle(struct tty_struct *tty) | |||
1674 | 1674 | ||
1675 | static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios) | 1675 | static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios) |
1676 | { | 1676 | { |
1677 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1677 | struct mxser_struct *info = tty->driver_data; |
1678 | unsigned long flags; | 1678 | unsigned long flags; |
1679 | 1679 | ||
1680 | if ((tty->termios->c_cflag != old_termios->c_cflag) || (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { | 1680 | if ((tty->termios->c_cflag != old_termios->c_cflag) || (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { |
@@ -1711,7 +1711,7 @@ static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termio | |||
1711 | */ | 1711 | */ |
1712 | static void mxser_stop(struct tty_struct *tty) | 1712 | static void mxser_stop(struct tty_struct *tty) |
1713 | { | 1713 | { |
1714 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1714 | struct mxser_struct *info = tty->driver_data; |
1715 | unsigned long flags; | 1715 | unsigned long flags; |
1716 | 1716 | ||
1717 | spin_lock_irqsave(&info->slock, flags); | 1717 | spin_lock_irqsave(&info->slock, flags); |
@@ -1724,7 +1724,7 @@ static void mxser_stop(struct tty_struct *tty) | |||
1724 | 1724 | ||
1725 | static void mxser_start(struct tty_struct *tty) | 1725 | static void mxser_start(struct tty_struct *tty) |
1726 | { | 1726 | { |
1727 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1727 | struct mxser_struct *info = tty->driver_data; |
1728 | unsigned long flags; | 1728 | unsigned long flags; |
1729 | 1729 | ||
1730 | spin_lock_irqsave(&info->slock, flags); | 1730 | spin_lock_irqsave(&info->slock, flags); |
@@ -1740,7 +1740,7 @@ static void mxser_start(struct tty_struct *tty) | |||
1740 | */ | 1740 | */ |
1741 | static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) | 1741 | static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) |
1742 | { | 1742 | { |
1743 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1743 | struct mxser_struct *info = tty->driver_data; |
1744 | unsigned long orig_jiffies, char_time; | 1744 | unsigned long orig_jiffies, char_time; |
1745 | int lsr; | 1745 | int lsr; |
1746 | 1746 | ||
@@ -1803,7 +1803,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) | |||
1803 | */ | 1803 | */ |
1804 | void mxser_hangup(struct tty_struct *tty) | 1804 | void mxser_hangup(struct tty_struct *tty) |
1805 | { | 1805 | { |
1806 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1806 | struct mxser_struct *info = tty->driver_data; |
1807 | 1807 | ||
1808 | mxser_flush_buffer(tty); | 1808 | mxser_flush_buffer(tty); |
1809 | mxser_shutdown(info); | 1809 | mxser_shutdown(info); |
@@ -1821,7 +1821,7 @@ void mxser_hangup(struct tty_struct *tty) | |||
1821 | */ | 1821 | */ |
1822 | static void mxser_rs_break(struct tty_struct *tty, int break_state) | 1822 | static void mxser_rs_break(struct tty_struct *tty, int break_state) |
1823 | { | 1823 | { |
1824 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 1824 | struct mxser_struct *info = tty->driver_data; |
1825 | unsigned long flags; | 1825 | unsigned long flags; |
1826 | 1826 | ||
1827 | spin_lock_irqsave(&info->slock, flags); | 1827 | spin_lock_irqsave(&info->slock, flags); |
@@ -2886,7 +2886,7 @@ static void mxser_send_break(struct mxser_struct *info, int duration) | |||
2886 | 2886 | ||
2887 | static int mxser_tiocmget(struct tty_struct *tty, struct file *file) | 2887 | static int mxser_tiocmget(struct tty_struct *tty, struct file *file) |
2888 | { | 2888 | { |
2889 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 2889 | struct mxser_struct *info = tty->driver_data; |
2890 | unsigned char control, status; | 2890 | unsigned char control, status; |
2891 | unsigned long flags; | 2891 | unsigned long flags; |
2892 | 2892 | ||
@@ -2909,7 +2909,7 @@ static int mxser_tiocmget(struct tty_struct *tty, struct file *file) | |||
2909 | 2909 | ||
2910 | static int mxser_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear) | 2910 | static int mxser_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear) |
2911 | { | 2911 | { |
2912 | struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; | 2912 | struct mxser_struct *info = tty->driver_data; |
2913 | unsigned long flags; | 2913 | unsigned long flags; |
2914 | 2914 | ||
2915 | 2915 | ||