aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2009-01-02 08:47:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-02 13:19:40 -0500
commitc9f19e96a2f33cd56c2bd19f87a0c4982d011c2b (patch)
tree7ebb5f6e6648e7e8eb975944d4a18aadb05851bf /drivers
parent0ac6053c4db9369d7b0f9b39c30f4fb04405666b (diff)
tty: Remove some pointless casts
disc_data and driver_data are void * Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/amiserial.c34
-rw-r--r--drivers/char/epca.c10
-rw-r--r--drivers/char/generic_serial.c2
-rw-r--r--drivers/char/hvsi.c12
-rw-r--r--drivers/char/n_r3964.c12
-rw-r--r--drivers/char/riscom8.c34
-rw-r--r--drivers/char/rocket.c36
-rw-r--r--drivers/char/selection.c2
-rw-r--r--drivers/char/ser_a2232.c4
-rw-r--r--drivers/char/serial167.c32
-rw-r--r--drivers/char/specialix.c34
-rw-r--r--drivers/char/sx.c4
-rw-r--r--drivers/char/synclink.c36
-rw-r--r--drivers/char/synclinkmp.c38
-rw-r--r--drivers/char/vme_scc.c8
-rw-r--r--drivers/char/vt_ioctl.c2
16 files changed, 150 insertions, 150 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index b97aebd7aeb8..4e0cfdeab146 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -170,7 +170,7 @@ static __inline__ void rtsdtr_ctrl(int bits)
170 */ 170 */
171static void rs_stop(struct tty_struct *tty) 171static void rs_stop(struct tty_struct *tty)
172{ 172{
173 struct async_struct *info = (struct async_struct *)tty->driver_data; 173 struct async_struct *info = tty->driver_data;
174 unsigned long flags; 174 unsigned long flags;
175 175
176 if (serial_paranoia_check(info, tty->name, "rs_stop")) 176 if (serial_paranoia_check(info, tty->name, "rs_stop"))
@@ -190,7 +190,7 @@ static void rs_stop(struct tty_struct *tty)
190 190
191static void rs_start(struct tty_struct *tty) 191static void rs_start(struct tty_struct *tty)
192{ 192{
193 struct async_struct *info = (struct async_struct *)tty->driver_data; 193 struct async_struct *info = tty->driver_data;
194 unsigned long flags; 194 unsigned long flags;
195 195
196 if (serial_paranoia_check(info, tty->name, "rs_start")) 196 if (serial_paranoia_check(info, tty->name, "rs_start"))
@@ -861,7 +861,7 @@ static int rs_put_char(struct tty_struct *tty, unsigned char ch)
861 861
862static void rs_flush_chars(struct tty_struct *tty) 862static void rs_flush_chars(struct tty_struct *tty)
863{ 863{
864 struct async_struct *info = (struct async_struct *)tty->driver_data; 864 struct async_struct *info = tty->driver_data;
865 unsigned long flags; 865 unsigned long flags;
866 866
867 if (serial_paranoia_check(info, tty->name, "rs_flush_chars")) 867 if (serial_paranoia_check(info, tty->name, "rs_flush_chars"))
@@ -934,7 +934,7 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count
934 934
935static int rs_write_room(struct tty_struct *tty) 935static int rs_write_room(struct tty_struct *tty)
936{ 936{
937 struct async_struct *info = (struct async_struct *)tty->driver_data; 937 struct async_struct *info = tty->driver_data;
938 938
939 if (serial_paranoia_check(info, tty->name, "rs_write_room")) 939 if (serial_paranoia_check(info, tty->name, "rs_write_room"))
940 return 0; 940 return 0;
@@ -943,7 +943,7 @@ static int rs_write_room(struct tty_struct *tty)
943 943
944static int rs_chars_in_buffer(struct tty_struct *tty) 944static int rs_chars_in_buffer(struct tty_struct *tty)
945{ 945{
946 struct async_struct *info = (struct async_struct *)tty->driver_data; 946 struct async_struct *info = tty->driver_data;
947 947
948 if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer")) 948 if (serial_paranoia_check(info, tty->name, "rs_chars_in_buffer"))
949 return 0; 949 return 0;
@@ -952,7 +952,7 @@ static int rs_chars_in_buffer(struct tty_struct *tty)
952 952
953static void rs_flush_buffer(struct tty_struct *tty) 953static void rs_flush_buffer(struct tty_struct *tty)
954{ 954{
955 struct async_struct *info = (struct async_struct *)tty->driver_data; 955 struct async_struct *info = tty->driver_data;
956 unsigned long flags; 956 unsigned long flags;
957 957
958 if (serial_paranoia_check(info, tty->name, "rs_flush_buffer")) 958 if (serial_paranoia_check(info, tty->name, "rs_flush_buffer"))
@@ -969,7 +969,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
969 */ 969 */
970static void rs_send_xchar(struct tty_struct *tty, char ch) 970static void rs_send_xchar(struct tty_struct *tty, char ch)
971{ 971{
972 struct async_struct *info = (struct async_struct *)tty->driver_data; 972 struct async_struct *info = tty->driver_data;
973 unsigned long flags; 973 unsigned long flags;
974 974
975 if (serial_paranoia_check(info, tty->name, "rs_send_char")) 975 if (serial_paranoia_check(info, tty->name, "rs_send_char"))
@@ -1004,7 +1004,7 @@ static void rs_send_xchar(struct tty_struct *tty, char ch)
1004 */ 1004 */
1005static void rs_throttle(struct tty_struct * tty) 1005static void rs_throttle(struct tty_struct * tty)
1006{ 1006{
1007 struct async_struct *info = (struct async_struct *)tty->driver_data; 1007 struct async_struct *info = tty->driver_data;
1008 unsigned long flags; 1008 unsigned long flags;
1009#ifdef SERIAL_DEBUG_THROTTLE 1009#ifdef SERIAL_DEBUG_THROTTLE
1010 char buf[64]; 1010 char buf[64];
@@ -1029,7 +1029,7 @@ static void rs_throttle(struct tty_struct * tty)
1029 1029
1030static void rs_unthrottle(struct tty_struct * tty) 1030static void rs_unthrottle(struct tty_struct * tty)
1031{ 1031{
1032 struct async_struct *info = (struct async_struct *)tty->driver_data; 1032 struct async_struct *info = tty->driver_data;
1033 unsigned long flags; 1033 unsigned long flags;
1034#ifdef SERIAL_DEBUG_THROTTLE 1034#ifdef SERIAL_DEBUG_THROTTLE
1035 char buf[64]; 1035 char buf[64];
@@ -1194,7 +1194,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int __user *value)
1194 1194
1195static int rs_tiocmget(struct tty_struct *tty, struct file *file) 1195static int rs_tiocmget(struct tty_struct *tty, struct file *file)
1196{ 1196{
1197 struct async_struct * info = (struct async_struct *)tty->driver_data; 1197 struct async_struct * info = tty->driver_data;
1198 unsigned char control, status; 1198 unsigned char control, status;
1199 unsigned long flags; 1199 unsigned long flags;
1200 1200
@@ -1217,7 +1217,7 @@ static int rs_tiocmget(struct tty_struct *tty, struct file *file)
1217static int rs_tiocmset(struct tty_struct *tty, struct file *file, 1217static int rs_tiocmset(struct tty_struct *tty, struct file *file,
1218 unsigned int set, unsigned int clear) 1218 unsigned int set, unsigned int clear)
1219{ 1219{
1220 struct async_struct * info = (struct async_struct *)tty->driver_data; 1220 struct async_struct * info = tty->driver_data;
1221 unsigned long flags; 1221 unsigned long flags;
1222 1222
1223 if (serial_paranoia_check(info, tty->name, "rs_ioctl")) 1223 if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
@@ -1244,7 +1244,7 @@ static int rs_tiocmset(struct tty_struct *tty, struct file *file,
1244 */ 1244 */
1245static int rs_break(struct tty_struct *tty, int break_state) 1245static int rs_break(struct tty_struct *tty, int break_state)
1246{ 1246{
1247 struct async_struct * info = (struct async_struct *)tty->driver_data; 1247 struct async_struct * info = tty->driver_data;
1248 unsigned long flags; 1248 unsigned long flags;
1249 1249
1250 if (serial_paranoia_check(info, tty->name, "rs_break")) 1250 if (serial_paranoia_check(info, tty->name, "rs_break"))
@@ -1264,7 +1264,7 @@ static int rs_break(struct tty_struct *tty, int break_state)
1264static int rs_ioctl(struct tty_struct *tty, struct file * file, 1264static int rs_ioctl(struct tty_struct *tty, struct file * file,
1265 unsigned int cmd, unsigned long arg) 1265 unsigned int cmd, unsigned long arg)
1266{ 1266{
1267 struct async_struct * info = (struct async_struct *)tty->driver_data; 1267 struct async_struct * info = tty->driver_data;
1268 struct async_icount cprev, cnow; /* kernel counter temps */ 1268 struct async_icount cprev, cnow; /* kernel counter temps */
1269 struct serial_icounter_struct icount; 1269 struct serial_icounter_struct icount;
1270 void __user *argp = (void __user *)arg; 1270 void __user *argp = (void __user *)arg;
@@ -1368,7 +1368,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
1368 1368
1369static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) 1369static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1370{ 1370{
1371 struct async_struct *info = (struct async_struct *)tty->driver_data; 1371 struct async_struct *info = tty->driver_data;
1372 unsigned long flags; 1372 unsigned long flags;
1373 unsigned int cflag = tty->termios->c_cflag; 1373 unsigned int cflag = tty->termios->c_cflag;
1374 1374
@@ -1428,7 +1428,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1428 */ 1428 */
1429static void rs_close(struct tty_struct *tty, struct file * filp) 1429static void rs_close(struct tty_struct *tty, struct file * filp)
1430{ 1430{
1431 struct async_struct * info = (struct async_struct *)tty->driver_data; 1431 struct async_struct * info = tty->driver_data;
1432 struct serial_state *state; 1432 struct serial_state *state;
1433 unsigned long flags; 1433 unsigned long flags;
1434 1434
@@ -1523,7 +1523,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
1523 */ 1523 */
1524static void rs_wait_until_sent(struct tty_struct *tty, int timeout) 1524static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
1525{ 1525{
1526 struct async_struct * info = (struct async_struct *)tty->driver_data; 1526 struct async_struct * info = tty->driver_data;
1527 unsigned long orig_jiffies, char_time; 1527 unsigned long orig_jiffies, char_time;
1528 int lsr; 1528 int lsr;
1529 1529
@@ -1587,7 +1587,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
1587 */ 1587 */
1588static void rs_hangup(struct tty_struct *tty) 1588static void rs_hangup(struct tty_struct *tty)
1589{ 1589{
1590 struct async_struct * info = (struct async_struct *)tty->driver_data; 1590 struct async_struct * info = tty->driver_data;
1591 struct serial_state *state = info->state; 1591 struct serial_state *state = info->state;
1592 1592
1593 if (serial_paranoia_check(info, tty->name, "rs_hangup")) 1593 if (serial_paranoia_check(info, tty->name, "rs_hangup"))
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index cf2461d34e5f..da2d2cf16f55 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -392,7 +392,7 @@ static struct channel *verifyChannel(struct tty_struct *tty)
392 * through tty->driver_data this should catch it. 392 * through tty->driver_data this should catch it.
393 */ 393 */
394 if (tty) { 394 if (tty) {
395 struct channel *ch = (struct channel *)tty->driver_data; 395 struct channel *ch = tty->driver_data;
396 if (ch >= &digi_channels[0] && ch < &digi_channels[nbdevs]) { 396 if (ch >= &digi_channels[0] && ch < &digi_channels[nbdevs]) {
397 if (ch->magic == EPCA_MAGIC) 397 if (ch->magic == EPCA_MAGIC)
398 return ch; 398 return ch;
@@ -2097,7 +2097,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file,
2097 2097
2098static int pc_tiocmget(struct tty_struct *tty, struct file *file) 2098static int pc_tiocmget(struct tty_struct *tty, struct file *file)
2099{ 2099{
2100 struct channel *ch = (struct channel *) tty->driver_data; 2100 struct channel *ch = tty->driver_data;
2101 struct board_chan __iomem *bc; 2101 struct board_chan __iomem *bc;
2102 unsigned int mstat, mflag = 0; 2102 unsigned int mstat, mflag = 0;
2103 unsigned long flags; 2103 unsigned long flags;
@@ -2131,7 +2131,7 @@ static int pc_tiocmget(struct tty_struct *tty, struct file *file)
2131static int pc_tiocmset(struct tty_struct *tty, struct file *file, 2131static int pc_tiocmset(struct tty_struct *tty, struct file *file,
2132 unsigned int set, unsigned int clear) 2132 unsigned int set, unsigned int clear)
2133{ 2133{
2134 struct channel *ch = (struct channel *) tty->driver_data; 2134 struct channel *ch = tty->driver_data;
2135 unsigned long flags; 2135 unsigned long flags;
2136 2136
2137 if (!ch) 2137 if (!ch)
@@ -2178,7 +2178,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,
2178 unsigned int mflag, mstat; 2178 unsigned int mflag, mstat;
2179 unsigned char startc, stopc; 2179 unsigned char startc, stopc;
2180 struct board_chan __iomem *bc; 2180 struct board_chan __iomem *bc;
2181 struct channel *ch = (struct channel *) tty->driver_data; 2181 struct channel *ch = tty->driver_data;
2182 void __user *argp = (void __user *)arg; 2182 void __user *argp = (void __user *)arg;
2183 2183
2184 if (ch) 2184 if (ch)
@@ -2473,7 +2473,7 @@ static void pc_unthrottle(struct tty_struct *tty)
2473 2473
2474static int pc_send_break(struct tty_struct *tty, int msec) 2474static int pc_send_break(struct tty_struct *tty, int msec)
2475{ 2475{
2476 struct channel *ch = (struct channel *) tty->driver_data; 2476 struct channel *ch = tty->driver_data;
2477 unsigned long flags; 2477 unsigned long flags;
2478 2478
2479 if (msec == -1) 2479 if (msec == -1)
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
index 2f040d1ed89f..9e4e569dc00d 100644
--- a/drivers/char/generic_serial.c
+++ b/drivers/char/generic_serial.c
@@ -511,7 +511,7 @@ void gs_close(struct tty_struct * tty, struct file * filp)
511 511
512 func_enter (); 512 func_enter ();
513 513
514 port = (struct gs_port *) tty->driver_data; 514 port = tty->driver_data;
515 515
516 if (!port) return; 516 if (!port) return;
517 517
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index af055287271a..406f8742a260 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -997,14 +997,14 @@ out:
997 997
998static int hvsi_write_room(struct tty_struct *tty) 998static int hvsi_write_room(struct tty_struct *tty)
999{ 999{
1000 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1000 struct hvsi_struct *hp = tty->driver_data;
1001 1001
1002 return N_OUTBUF - hp->n_outbuf; 1002 return N_OUTBUF - hp->n_outbuf;
1003} 1003}
1004 1004
1005static int hvsi_chars_in_buffer(struct tty_struct *tty) 1005static int hvsi_chars_in_buffer(struct tty_struct *tty)
1006{ 1006{
1007 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1007 struct hvsi_struct *hp = tty->driver_data;
1008 1008
1009 return hp->n_outbuf; 1009 return hp->n_outbuf;
1010} 1010}
@@ -1070,7 +1070,7 @@ out:
1070 */ 1070 */
1071static void hvsi_throttle(struct tty_struct *tty) 1071static void hvsi_throttle(struct tty_struct *tty)
1072{ 1072{
1073 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1073 struct hvsi_struct *hp = tty->driver_data;
1074 1074
1075 pr_debug("%s\n", __func__); 1075 pr_debug("%s\n", __func__);
1076 1076
@@ -1079,7 +1079,7 @@ static void hvsi_throttle(struct tty_struct *tty)
1079 1079
1080static void hvsi_unthrottle(struct tty_struct *tty) 1080static void hvsi_unthrottle(struct tty_struct *tty)
1081{ 1081{
1082 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1082 struct hvsi_struct *hp = tty->driver_data;
1083 unsigned long flags; 1083 unsigned long flags;
1084 int shouldflip = 0; 1084 int shouldflip = 0;
1085 1085
@@ -1100,7 +1100,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)
1100 1100
1101static int hvsi_tiocmget(struct tty_struct *tty, struct file *file) 1101static int hvsi_tiocmget(struct tty_struct *tty, struct file *file)
1102{ 1102{
1103 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1103 struct hvsi_struct *hp = tty->driver_data;
1104 1104
1105 hvsi_get_mctrl(hp); 1105 hvsi_get_mctrl(hp);
1106 return hp->mctrl; 1106 return hp->mctrl;
@@ -1109,7 +1109,7 @@ static int hvsi_tiocmget(struct tty_struct *tty, struct file *file)
1109static int hvsi_tiocmset(struct tty_struct *tty, struct file *file, 1109static int hvsi_tiocmset(struct tty_struct *tty, struct file *file,
1110 unsigned int set, unsigned int clear) 1110 unsigned int set, unsigned int clear)
1111{ 1111{
1112 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1112 struct hvsi_struct *hp = tty->driver_data;
1113 unsigned long flags; 1113 unsigned long flags;
1114 uint16_t new_mctrl; 1114 uint16_t new_mctrl;
1115 1115
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index 4a8215a89ad3..d2e93e343226 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -1003,7 +1003,7 @@ static int r3964_open(struct tty_struct *tty)
1003 1003
1004static void r3964_close(struct tty_struct *tty) 1004static void r3964_close(struct tty_struct *tty)
1005{ 1005{
1006 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1006 struct r3964_info *pInfo = tty->disc_data;
1007 struct r3964_client_info *pClient, *pNext; 1007 struct r3964_client_info *pClient, *pNext;
1008 struct r3964_message *pMsg; 1008 struct r3964_message *pMsg;
1009 struct r3964_block_header *pHeader, *pNextHeader; 1009 struct r3964_block_header *pHeader, *pNextHeader;
@@ -1058,7 +1058,7 @@ static void r3964_close(struct tty_struct *tty)
1058static ssize_t r3964_read(struct tty_struct *tty, struct file *file, 1058static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
1059 unsigned char __user * buf, size_t nr) 1059 unsigned char __user * buf, size_t nr)
1060{ 1060{
1061 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1061 struct r3964_info *pInfo = tty->disc_data;
1062 struct r3964_client_info *pClient; 1062 struct r3964_client_info *pClient;
1063 struct r3964_message *pMsg; 1063 struct r3964_message *pMsg;
1064 struct r3964_client_message theMsg; 1064 struct r3964_client_message theMsg;
@@ -1113,7 +1113,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
1113static ssize_t r3964_write(struct tty_struct *tty, struct file *file, 1113static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
1114 const unsigned char *data, size_t count) 1114 const unsigned char *data, size_t count)
1115{ 1115{
1116 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1116 struct r3964_info *pInfo = tty->disc_data;
1117 struct r3964_block_header *pHeader; 1117 struct r3964_block_header *pHeader;
1118 struct r3964_client_info *pClient; 1118 struct r3964_client_info *pClient;
1119 unsigned char *new_data; 1119 unsigned char *new_data;
@@ -1182,7 +1182,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
1182static int r3964_ioctl(struct tty_struct *tty, struct file *file, 1182static int r3964_ioctl(struct tty_struct *tty, struct file *file,
1183 unsigned int cmd, unsigned long arg) 1183 unsigned int cmd, unsigned long arg)
1184{ 1184{
1185 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1185 struct r3964_info *pInfo = tty->disc_data;
1186 if (pInfo == NULL) 1186 if (pInfo == NULL)
1187 return -EINVAL; 1187 return -EINVAL;
1188 switch (cmd) { 1188 switch (cmd) {
@@ -1216,7 +1216,7 @@ static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old)
1216static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, 1216static unsigned int r3964_poll(struct tty_struct *tty, struct file *file,
1217 struct poll_table_struct *wait) 1217 struct poll_table_struct *wait)
1218{ 1218{
1219 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1219 struct r3964_info *pInfo = tty->disc_data;
1220 struct r3964_client_info *pClient; 1220 struct r3964_client_info *pClient;
1221 struct r3964_message *pMsg = NULL; 1221 struct r3964_message *pMsg = NULL;
1222 unsigned long flags; 1222 unsigned long flags;
@@ -1241,7 +1241,7 @@ static unsigned int r3964_poll(struct tty_struct *tty, struct file *file,
1241static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, 1241static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp,
1242 char *fp, int count) 1242 char *fp, int count)
1243{ 1243{
1244 struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; 1244 struct r3964_info *pInfo = tty->disc_data;
1245 const unsigned char *p; 1245 const unsigned char *p;
1246 char *f, flags = 0; 1246 char *f, flags = 0;
1247 int i; 1247 int i;
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 9ac5febd8abd..9af8d74875bc 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -906,7 +906,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
906 906
907static void rc_flush_buffer(struct tty_struct *tty) 907static void rc_flush_buffer(struct tty_struct *tty)
908{ 908{
909 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 909 struct riscom_port *port = tty->driver_data;
910 unsigned long flags; 910 unsigned long flags;
911 911
912 if (rc_paranoia_check(port, tty->name, "rc_flush_buffer")) 912 if (rc_paranoia_check(port, tty->name, "rc_flush_buffer"))
@@ -921,7 +921,7 @@ static void rc_flush_buffer(struct tty_struct *tty)
921 921
922static void rc_close(struct tty_struct *tty, struct file *filp) 922static void rc_close(struct tty_struct *tty, struct file *filp)
923{ 923{
924 struct riscom_port *port = (struct riscom_port *) tty->driver_data; 924 struct riscom_port *port = tty->driver_data;
925 struct riscom_board *bp; 925 struct riscom_board *bp;
926 unsigned long flags; 926 unsigned long flags;
927 unsigned long timeout; 927 unsigned long timeout;
@@ -972,7 +972,7 @@ static void rc_close(struct tty_struct *tty, struct file *filp)
972static int rc_write(struct tty_struct *tty, 972static int rc_write(struct tty_struct *tty,
973 const unsigned char *buf, int count) 973 const unsigned char *buf, int count)
974{ 974{
975 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 975 struct riscom_port *port = tty->driver_data;
976 struct riscom_board *bp; 976 struct riscom_board *bp;
977 int c, total = 0; 977 int c, total = 0;
978 unsigned long flags; 978 unsigned long flags;
@@ -1015,7 +1015,7 @@ static int rc_write(struct tty_struct *tty,
1015 1015
1016static int rc_put_char(struct tty_struct *tty, unsigned char ch) 1016static int rc_put_char(struct tty_struct *tty, unsigned char ch)
1017{ 1017{
1018 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1018 struct riscom_port *port = tty->driver_data;
1019 unsigned long flags; 1019 unsigned long flags;
1020 int ret = 0; 1020 int ret = 0;
1021 1021
@@ -1039,7 +1039,7 @@ out:
1039 1039
1040static void rc_flush_chars(struct tty_struct *tty) 1040static void rc_flush_chars(struct tty_struct *tty)
1041{ 1041{
1042 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1042 struct riscom_port *port = tty->driver_data;
1043 unsigned long flags; 1043 unsigned long flags;
1044 1044
1045 if (rc_paranoia_check(port, tty->name, "rc_flush_chars")) 1045 if (rc_paranoia_check(port, tty->name, "rc_flush_chars"))
@@ -1059,7 +1059,7 @@ static void rc_flush_chars(struct tty_struct *tty)
1059 1059
1060static int rc_write_room(struct tty_struct *tty) 1060static int rc_write_room(struct tty_struct *tty)
1061{ 1061{
1062 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1062 struct riscom_port *port = tty->driver_data;
1063 int ret; 1063 int ret;
1064 1064
1065 if (rc_paranoia_check(port, tty->name, "rc_write_room")) 1065 if (rc_paranoia_check(port, tty->name, "rc_write_room"))
@@ -1073,7 +1073,7 @@ static int rc_write_room(struct tty_struct *tty)
1073 1073
1074static int rc_chars_in_buffer(struct tty_struct *tty) 1074static int rc_chars_in_buffer(struct tty_struct *tty)
1075{ 1075{
1076 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1076 struct riscom_port *port = tty->driver_data;
1077 1077
1078 if (rc_paranoia_check(port, tty->name, "rc_chars_in_buffer")) 1078 if (rc_paranoia_check(port, tty->name, "rc_chars_in_buffer"))
1079 return 0; 1079 return 0;
@@ -1083,7 +1083,7 @@ static int rc_chars_in_buffer(struct tty_struct *tty)
1083 1083
1084static int rc_tiocmget(struct tty_struct *tty, struct file *file) 1084static int rc_tiocmget(struct tty_struct *tty, struct file *file)
1085{ 1085{
1086 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1086 struct riscom_port *port = tty->driver_data;
1087 struct riscom_board *bp; 1087 struct riscom_board *bp;
1088 unsigned char status; 1088 unsigned char status;
1089 unsigned int result; 1089 unsigned int result;
@@ -1113,7 +1113,7 @@ static int rc_tiocmget(struct tty_struct *tty, struct file *file)
1113static int rc_tiocmset(struct tty_struct *tty, struct file *file, 1113static int rc_tiocmset(struct tty_struct *tty, struct file *file,
1114 unsigned int set, unsigned int clear) 1114 unsigned int set, unsigned int clear)
1115{ 1115{
1116 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1116 struct riscom_port *port = tty->driver_data;
1117 unsigned long flags; 1117 unsigned long flags;
1118 struct riscom_board *bp; 1118 struct riscom_board *bp;
1119 1119
@@ -1145,7 +1145,7 @@ static int rc_tiocmset(struct tty_struct *tty, struct file *file,
1145 1145
1146static int rc_send_break(struct tty_struct *tty, int length) 1146static int rc_send_break(struct tty_struct *tty, int length)
1147{ 1147{
1148 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1148 struct riscom_port *port = tty->driver_data;
1149 struct riscom_board *bp = port_Board(port); 1149 struct riscom_board *bp = port_Board(port);
1150 unsigned long flags; 1150 unsigned long flags;
1151 1151
@@ -1238,7 +1238,7 @@ static int rc_get_serial_info(struct riscom_port *port,
1238static int rc_ioctl(struct tty_struct *tty, struct file *filp, 1238static int rc_ioctl(struct tty_struct *tty, struct file *filp,
1239 unsigned int cmd, unsigned long arg) 1239 unsigned int cmd, unsigned long arg)
1240{ 1240{
1241 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1241 struct riscom_port *port = tty->driver_data;
1242 void __user *argp = (void __user *)arg; 1242 void __user *argp = (void __user *)arg;
1243 int retval; 1243 int retval;
1244 1244
@@ -1264,7 +1264,7 @@ static int rc_ioctl(struct tty_struct *tty, struct file *filp,
1264 1264
1265static void rc_throttle(struct tty_struct *tty) 1265static void rc_throttle(struct tty_struct *tty)
1266{ 1266{
1267 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1267 struct riscom_port *port = tty->driver_data;
1268 struct riscom_board *bp; 1268 struct riscom_board *bp;
1269 unsigned long flags; 1269 unsigned long flags;
1270 1270
@@ -1286,7 +1286,7 @@ static void rc_throttle(struct tty_struct *tty)
1286 1286
1287static void rc_unthrottle(struct tty_struct *tty) 1287static void rc_unthrottle(struct tty_struct *tty)
1288{ 1288{
1289 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1289 struct riscom_port *port = tty->driver_data;
1290 struct riscom_board *bp; 1290 struct riscom_board *bp;
1291 unsigned long flags; 1291 unsigned long flags;
1292 1292
@@ -1308,7 +1308,7 @@ static void rc_unthrottle(struct tty_struct *tty)
1308 1308
1309static void rc_stop(struct tty_struct *tty) 1309static void rc_stop(struct tty_struct *tty)
1310{ 1310{
1311 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1311 struct riscom_port *port = tty->driver_data;
1312 struct riscom_board *bp; 1312 struct riscom_board *bp;
1313 unsigned long flags; 1313 unsigned long flags;
1314 1314
@@ -1326,7 +1326,7 @@ static void rc_stop(struct tty_struct *tty)
1326 1326
1327static void rc_start(struct tty_struct *tty) 1327static void rc_start(struct tty_struct *tty)
1328{ 1328{
1329 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1329 struct riscom_port *port = tty->driver_data;
1330 struct riscom_board *bp; 1330 struct riscom_board *bp;
1331 unsigned long flags; 1331 unsigned long flags;
1332 1332
@@ -1347,7 +1347,7 @@ static void rc_start(struct tty_struct *tty)
1347 1347
1348static void rc_hangup(struct tty_struct *tty) 1348static void rc_hangup(struct tty_struct *tty)
1349{ 1349{
1350 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1350 struct riscom_port *port = tty->driver_data;
1351 struct riscom_board *bp; 1351 struct riscom_board *bp;
1352 unsigned long flags; 1352 unsigned long flags;
1353 1353
@@ -1368,7 +1368,7 @@ static void rc_hangup(struct tty_struct *tty)
1368static void rc_set_termios(struct tty_struct *tty, 1368static void rc_set_termios(struct tty_struct *tty,
1369 struct ktermios *old_termios) 1369 struct ktermios *old_termios)
1370{ 1370{
1371 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1371 struct riscom_port *port = tty->driver_data;
1372 unsigned long flags; 1372 unsigned long flags;
1373 1373
1374 if (rc_paranoia_check(port, tty->name, "rc_set_termios")) 1374 if (rc_paranoia_check(port, tty->name, "rc_set_termios"))
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 9d819808e84b..1e68cc2296fa 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1094,7 +1094,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
1094 */ 1094 */
1095static void rp_close(struct tty_struct *tty, struct file *filp) 1095static void rp_close(struct tty_struct *tty, struct file *filp)
1096{ 1096{
1097 struct r_port *info = (struct r_port *) tty->driver_data; 1097 struct r_port *info = tty->driver_data;
1098 unsigned long flags; 1098 unsigned long flags;
1099 int timeout; 1099 int timeout;
1100 CHANNEL_t *cp; 1100 CHANNEL_t *cp;
@@ -1208,7 +1208,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
1208static void rp_set_termios(struct tty_struct *tty, 1208static void rp_set_termios(struct tty_struct *tty,
1209 struct ktermios *old_termios) 1209 struct ktermios *old_termios)
1210{ 1210{
1211 struct r_port *info = (struct r_port *) tty->driver_data; 1211 struct r_port *info = tty->driver_data;
1212 CHANNEL_t *cp; 1212 CHANNEL_t *cp;
1213 unsigned cflag; 1213 unsigned cflag;
1214 1214
@@ -1251,7 +1251,7 @@ static void rp_set_termios(struct tty_struct *tty,
1251 1251
1252static int rp_break(struct tty_struct *tty, int break_state) 1252static int rp_break(struct tty_struct *tty, int break_state)
1253{ 1253{
1254 struct r_port *info = (struct r_port *) tty->driver_data; 1254 struct r_port *info = tty->driver_data;
1255 unsigned long flags; 1255 unsigned long flags;
1256 1256
1257 if (rocket_paranoia_check(info, "rp_break")) 1257 if (rocket_paranoia_check(info, "rp_break"))
@@ -1297,7 +1297,7 @@ static int sGetChanRI(CHANNEL_T * ChP)
1297 */ 1297 */
1298static int rp_tiocmget(struct tty_struct *tty, struct file *file) 1298static int rp_tiocmget(struct tty_struct *tty, struct file *file)
1299{ 1299{
1300 struct r_port *info = (struct r_port *)tty->driver_data; 1300 struct r_port *info = tty->driver_data;
1301 unsigned int control, result, ChanStatus; 1301 unsigned int control, result, ChanStatus;
1302 1302
1303 ChanStatus = sGetChanStatusLo(&info->channel); 1303 ChanStatus = sGetChanStatusLo(&info->channel);
@@ -1318,7 +1318,7 @@ static int rp_tiocmget(struct tty_struct *tty, struct file *file)
1318static int rp_tiocmset(struct tty_struct *tty, struct file *file, 1318static int rp_tiocmset(struct tty_struct *tty, struct file *file,
1319 unsigned int set, unsigned int clear) 1319 unsigned int set, unsigned int clear)
1320{ 1320{
1321 struct r_port *info = (struct r_port *)tty->driver_data; 1321 struct r_port *info = tty->driver_data;
1322 1322
1323 if (set & TIOCM_RTS) 1323 if (set & TIOCM_RTS)
1324 info->channel.TxControl[3] |= SET_RTS; 1324 info->channel.TxControl[3] |= SET_RTS;
@@ -1447,7 +1447,7 @@ static int get_version(struct r_port *info, struct rocket_version __user *retver
1447static int rp_ioctl(struct tty_struct *tty, struct file *file, 1447static int rp_ioctl(struct tty_struct *tty, struct file *file,
1448 unsigned int cmd, unsigned long arg) 1448 unsigned int cmd, unsigned long arg)
1449{ 1449{
1450 struct r_port *info = (struct r_port *) tty->driver_data; 1450 struct r_port *info = tty->driver_data;
1451 void __user *argp = (void __user *)arg; 1451 void __user *argp = (void __user *)arg;
1452 int ret = 0; 1452 int ret = 0;
1453 1453
@@ -1485,7 +1485,7 @@ static int rp_ioctl(struct tty_struct *tty, struct file *file,
1485 1485
1486static void rp_send_xchar(struct tty_struct *tty, char ch) 1486static void rp_send_xchar(struct tty_struct *tty, char ch)
1487{ 1487{
1488 struct r_port *info = (struct r_port *) tty->driver_data; 1488 struct r_port *info = tty->driver_data;
1489 CHANNEL_t *cp; 1489 CHANNEL_t *cp;
1490 1490
1491 if (rocket_paranoia_check(info, "rp_send_xchar")) 1491 if (rocket_paranoia_check(info, "rp_send_xchar"))
@@ -1500,7 +1500,7 @@ static void rp_send_xchar(struct tty_struct *tty, char ch)
1500 1500
1501static void rp_throttle(struct tty_struct *tty) 1501static void rp_throttle(struct tty_struct *tty)
1502{ 1502{
1503 struct r_port *info = (struct r_port *) tty->driver_data; 1503 struct r_port *info = tty->driver_data;
1504 CHANNEL_t *cp; 1504 CHANNEL_t *cp;
1505 1505
1506#ifdef ROCKET_DEBUG_THROTTLE 1506#ifdef ROCKET_DEBUG_THROTTLE
@@ -1520,7 +1520,7 @@ static void rp_throttle(struct tty_struct *tty)
1520 1520
1521static void rp_unthrottle(struct tty_struct *tty) 1521static void rp_unthrottle(struct tty_struct *tty)
1522{ 1522{
1523 struct r_port *info = (struct r_port *) tty->driver_data; 1523 struct r_port *info = tty->driver_data;
1524 CHANNEL_t *cp; 1524 CHANNEL_t *cp;
1525#ifdef ROCKET_DEBUG_THROTTLE 1525#ifdef ROCKET_DEBUG_THROTTLE
1526 printk(KERN_INFO "unthrottle %s: %d....\n", tty->name, 1526 printk(KERN_INFO "unthrottle %s: %d....\n", tty->name,
@@ -1547,7 +1547,7 @@ static void rp_unthrottle(struct tty_struct *tty)
1547 */ 1547 */
1548static void rp_stop(struct tty_struct *tty) 1548static void rp_stop(struct tty_struct *tty)
1549{ 1549{
1550 struct r_port *info = (struct r_port *) tty->driver_data; 1550 struct r_port *info = tty->driver_data;
1551 1551
1552#ifdef ROCKET_DEBUG_FLOW 1552#ifdef ROCKET_DEBUG_FLOW
1553 printk(KERN_INFO "stop %s: %d %d....\n", tty->name, 1553 printk(KERN_INFO "stop %s: %d %d....\n", tty->name,
@@ -1563,7 +1563,7 @@ static void rp_stop(struct tty_struct *tty)
1563 1563
1564static void rp_start(struct tty_struct *tty) 1564static void rp_start(struct tty_struct *tty)
1565{ 1565{
1566 struct r_port *info = (struct r_port *) tty->driver_data; 1566 struct r_port *info = tty->driver_data;
1567 1567
1568#ifdef ROCKET_DEBUG_FLOW 1568#ifdef ROCKET_DEBUG_FLOW
1569 printk(KERN_INFO "start %s: %d %d....\n", tty->name, 1569 printk(KERN_INFO "start %s: %d %d....\n", tty->name,
@@ -1583,7 +1583,7 @@ static void rp_start(struct tty_struct *tty)
1583 */ 1583 */
1584static void rp_wait_until_sent(struct tty_struct *tty, int timeout) 1584static void rp_wait_until_sent(struct tty_struct *tty, int timeout)
1585{ 1585{
1586 struct r_port *info = (struct r_port *) tty->driver_data; 1586 struct r_port *info = tty->driver_data;
1587 CHANNEL_t *cp; 1587 CHANNEL_t *cp;
1588 unsigned long orig_jiffies; 1588 unsigned long orig_jiffies;
1589 int check_time, exit_time; 1589 int check_time, exit_time;
@@ -1640,7 +1640,7 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout)
1640static void rp_hangup(struct tty_struct *tty) 1640static void rp_hangup(struct tty_struct *tty)
1641{ 1641{
1642 CHANNEL_t *cp; 1642 CHANNEL_t *cp;
1643 struct r_port *info = (struct r_port *) tty->driver_data; 1643 struct r_port *info = tty->driver_data;
1644 1644
1645 if (rocket_paranoia_check(info, "rp_hangup")) 1645 if (rocket_paranoia_check(info, "rp_hangup"))
1646 return; 1646 return;
@@ -1680,7 +1680,7 @@ static void rp_hangup(struct tty_struct *tty)
1680 */ 1680 */
1681static int rp_put_char(struct tty_struct *tty, unsigned char ch) 1681static int rp_put_char(struct tty_struct *tty, unsigned char ch)
1682{ 1682{
1683 struct r_port *info = (struct r_port *) tty->driver_data; 1683 struct r_port *info = tty->driver_data;
1684 CHANNEL_t *cp; 1684 CHANNEL_t *cp;
1685 unsigned long flags; 1685 unsigned long flags;
1686 1686
@@ -1727,7 +1727,7 @@ static int rp_put_char(struct tty_struct *tty, unsigned char ch)
1727static int rp_write(struct tty_struct *tty, 1727static int rp_write(struct tty_struct *tty,
1728 const unsigned char *buf, int count) 1728 const unsigned char *buf, int count)
1729{ 1729{
1730 struct r_port *info = (struct r_port *) tty->driver_data; 1730 struct r_port *info = tty->driver_data;
1731 CHANNEL_t *cp; 1731 CHANNEL_t *cp;
1732 const unsigned char *b; 1732 const unsigned char *b;
1733 int c, retval = 0; 1733 int c, retval = 0;
@@ -1819,7 +1819,7 @@ end:
1819 */ 1819 */
1820static int rp_write_room(struct tty_struct *tty) 1820static int rp_write_room(struct tty_struct *tty)
1821{ 1821{
1822 struct r_port *info = (struct r_port *) tty->driver_data; 1822 struct r_port *info = tty->driver_data;
1823 int ret; 1823 int ret;
1824 1824
1825 if (rocket_paranoia_check(info, "rp_write_room")) 1825 if (rocket_paranoia_check(info, "rp_write_room"))
@@ -1840,7 +1840,7 @@ static int rp_write_room(struct tty_struct *tty)
1840 */ 1840 */
1841static int rp_chars_in_buffer(struct tty_struct *tty) 1841static int rp_chars_in_buffer(struct tty_struct *tty)
1842{ 1842{
1843 struct r_port *info = (struct r_port *) tty->driver_data; 1843 struct r_port *info = tty->driver_data;
1844 CHANNEL_t *cp; 1844 CHANNEL_t *cp;
1845 1845
1846 if (rocket_paranoia_check(info, "rp_chars_in_buffer")) 1846 if (rocket_paranoia_check(info, "rp_chars_in_buffer"))
@@ -1861,7 +1861,7 @@ static int rp_chars_in_buffer(struct tty_struct *tty)
1861 */ 1861 */
1862static void rp_flush_buffer(struct tty_struct *tty) 1862static void rp_flush_buffer(struct tty_struct *tty)
1863{ 1863{
1864 struct r_port *info = (struct r_port *) tty->driver_data; 1864 struct r_port *info = tty->driver_data;
1865 CHANNEL_t *cp; 1865 CHANNEL_t *cp;
1866 unsigned long flags; 1866 unsigned long flags;
1867 1867
diff --git a/drivers/char/selection.c b/drivers/char/selection.c
index 2978a49a172b..f29fbe9b8ed7 100644
--- a/drivers/char/selection.c
+++ b/drivers/char/selection.c
@@ -306,7 +306,7 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t
306 */ 306 */
307int paste_selection(struct tty_struct *tty) 307int paste_selection(struct tty_struct *tty)
308{ 308{
309 struct vc_data *vc = (struct vc_data *)tty->driver_data; 309 struct vc_data *vc = tty->driver_data;
310 int pasted = 0; 310 int pasted = 0;
311 unsigned int count; 311 unsigned int count;
312 struct tty_ldisc *ld; 312 struct tty_ldisc *ld;
diff --git a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c
index 0c97f34df63a..33872a219df6 100644
--- a/drivers/char/ser_a2232.c
+++ b/drivers/char/ser_a2232.c
@@ -460,14 +460,14 @@ static void a2232_throttle(struct tty_struct *tty)
460 if switched on. So the only thing we can do at this 460 if switched on. So the only thing we can do at this
461 layer here is not taking any characters out of the 461 layer here is not taking any characters out of the
462 A2232 buffer any more. */ 462 A2232 buffer any more. */
463 struct a2232_port *port = (struct a2232_port *) tty->driver_data; 463 struct a2232_port *port = tty->driver_data;
464 port->throttle_input = -1; 464 port->throttle_input = -1;
465} 465}
466 466
467static void a2232_unthrottle(struct tty_struct *tty) 467static void a2232_unthrottle(struct tty_struct *tty)
468{ 468{
469/* Unthrottle: dual to "throttle()" above. */ 469/* Unthrottle: dual to "throttle()" above. */
470 struct a2232_port *port = (struct a2232_port *) tty->driver_data; 470 struct a2232_port *port = tty->driver_data;
471 port->throttle_input = 0; 471 port->throttle_input = 0;
472} 472}
473 473
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index a8f15e6be594..f1f24f0ee26f 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -315,7 +315,7 @@ u_short write_cy_cmd(volatile u_char * base_addr, u_char cmd)
315 315
316static void cy_stop(struct tty_struct *tty) 316static void cy_stop(struct tty_struct *tty)
317{ 317{
318 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 318 struct cyclades_port *info = tty->driver_data;
319 volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; 319 volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
320 int channel; 320 int channel;
321 unsigned long flags; 321 unsigned long flags;
@@ -337,7 +337,7 @@ static void cy_stop(struct tty_struct *tty)
337 337
338static void cy_start(struct tty_struct *tty) 338static void cy_start(struct tty_struct *tty)
339{ 339{
340 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 340 struct cyclades_port *info = tty->driver_data;
341 volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; 341 volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
342 int channel; 342 int channel;
343 unsigned long flags; 343 unsigned long flags;
@@ -1062,7 +1062,7 @@ static void config_setup(struct cyclades_port *info)
1062 1062
1063static int cy_put_char(struct tty_struct *tty, unsigned char ch) 1063static int cy_put_char(struct tty_struct *tty, unsigned char ch)
1064{ 1064{
1065 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1065 struct cyclades_port *info = tty->driver_data;
1066 unsigned long flags; 1066 unsigned long flags;
1067 1067
1068#ifdef SERIAL_DEBUG_IO 1068#ifdef SERIAL_DEBUG_IO
@@ -1090,7 +1090,7 @@ static int cy_put_char(struct tty_struct *tty, unsigned char ch)
1090 1090
1091static void cy_flush_chars(struct tty_struct *tty) 1091static void cy_flush_chars(struct tty_struct *tty)
1092{ 1092{
1093 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1093 struct cyclades_port *info = tty->driver_data;
1094 unsigned long flags; 1094 unsigned long flags;
1095 volatile unsigned char *base_addr = (u_char *) BASE_ADDR; 1095 volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
1096 int channel; 1096 int channel;
@@ -1122,7 +1122,7 @@ static void cy_flush_chars(struct tty_struct *tty)
1122 */ 1122 */
1123static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count) 1123static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count)
1124{ 1124{
1125 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1125 struct cyclades_port *info = tty->driver_data;
1126 unsigned long flags; 1126 unsigned long flags;
1127 int c, total = 0; 1127 int c, total = 0;
1128 1128
@@ -1166,7 +1166,7 @@ static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count)
1166 1166
1167static int cy_write_room(struct tty_struct *tty) 1167static int cy_write_room(struct tty_struct *tty)
1168{ 1168{
1169 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1169 struct cyclades_port *info = tty->driver_data;
1170 int ret; 1170 int ret;
1171 1171
1172#ifdef SERIAL_DEBUG_IO 1172#ifdef SERIAL_DEBUG_IO
@@ -1183,7 +1183,7 @@ static int cy_write_room(struct tty_struct *tty)
1183 1183
1184static int cy_chars_in_buffer(struct tty_struct *tty) 1184static int cy_chars_in_buffer(struct tty_struct *tty)
1185{ 1185{
1186 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1186 struct cyclades_port *info = tty->driver_data;
1187 1187
1188#ifdef SERIAL_DEBUG_IO 1188#ifdef SERIAL_DEBUG_IO
1189 printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */ 1189 printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */
@@ -1197,7 +1197,7 @@ static int cy_chars_in_buffer(struct tty_struct *tty)
1197 1197
1198static void cy_flush_buffer(struct tty_struct *tty) 1198static void cy_flush_buffer(struct tty_struct *tty)
1199{ 1199{
1200 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1200 struct cyclades_port *info = tty->driver_data;
1201 unsigned long flags; 1201 unsigned long flags;
1202 1202
1203#ifdef SERIAL_DEBUG_IO 1203#ifdef SERIAL_DEBUG_IO
@@ -1218,7 +1218,7 @@ static void cy_flush_buffer(struct tty_struct *tty)
1218 */ 1218 */
1219static void cy_throttle(struct tty_struct *tty) 1219static void cy_throttle(struct tty_struct *tty)
1220{ 1220{
1221 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1221 struct cyclades_port *info = tty->driver_data;
1222 unsigned long flags; 1222 unsigned long flags;
1223 volatile unsigned char *base_addr = (u_char *) BASE_ADDR; 1223 volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
1224 int channel; 1224 int channel;
@@ -1250,7 +1250,7 @@ static void cy_throttle(struct tty_struct *tty)
1250 1250
1251static void cy_unthrottle(struct tty_struct *tty) 1251static void cy_unthrottle(struct tty_struct *tty)
1252{ 1252{
1253 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1253 struct cyclades_port *info = tty->driver_data;
1254 unsigned long flags; 1254 unsigned long flags;
1255 volatile unsigned char *base_addr = (u_char *) BASE_ADDR; 1255 volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
1256 int channel; 1256 int channel;
@@ -1345,7 +1345,7 @@ check_and_exit:
1345 1345
1346static int cy_tiocmget(struct tty_struct *tty, struct file *file) 1346static int cy_tiocmget(struct tty_struct *tty, struct file *file)
1347{ 1347{
1348 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1348 struct cyclades_port *info = tty->driver_data;
1349 int channel; 1349 int channel;
1350 volatile unsigned char *base_addr = (u_char *) BASE_ADDR; 1350 volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
1351 unsigned long flags; 1351 unsigned long flags;
@@ -1369,7 +1369,7 @@ static int
1369cy_tiocmset(struct tty_struct *tty, struct file *file, 1369cy_tiocmset(struct tty_struct *tty, struct file *file,
1370 unsigned int set, unsigned int clear) 1370 unsigned int set, unsigned int clear)
1371{ 1371{
1372 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1372 struct cyclades_port *info = tty->driver_data;
1373 int channel; 1373 int channel;
1374 volatile unsigned char *base_addr = (u_char *) BASE_ADDR; 1374 volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
1375 unsigned long flags; 1375 unsigned long flags;
@@ -1532,7 +1532,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
1532 unsigned int cmd, unsigned long arg) 1532 unsigned int cmd, unsigned long arg)
1533{ 1533{
1534 unsigned long val; 1534 unsigned long val;
1535 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1535 struct cyclades_port *info = tty->driver_data;
1536 int ret_val = 0; 1536 int ret_val = 0;
1537 void __user *argp = (void __user *)arg; 1537 void __user *argp = (void __user *)arg;
1538 1538
@@ -1607,7 +1607,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
1607 1607
1608static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) 1608static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1609{ 1609{
1610 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1610 struct cyclades_port *info = tty->driver_data;
1611 1611
1612#ifdef SERIAL_DEBUG_OTHER 1612#ifdef SERIAL_DEBUG_OTHER
1613 printk("cy_set_termios %s\n", tty->name); 1613 printk("cy_set_termios %s\n", tty->name);
@@ -1631,7 +1631,7 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1631 1631
1632static void cy_close(struct tty_struct *tty, struct file *filp) 1632static void cy_close(struct tty_struct *tty, struct file *filp)
1633{ 1633{
1634 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1634 struct cyclades_port *info = tty->driver_data;
1635 1635
1636/* CP('C'); */ 1636/* CP('C'); */
1637#ifdef SERIAL_DEBUG_OTHER 1637#ifdef SERIAL_DEBUG_OTHER
@@ -1698,7 +1698,7 @@ static void cy_close(struct tty_struct *tty, struct file *filp)
1698 */ 1698 */
1699void cy_hangup(struct tty_struct *tty) 1699void cy_hangup(struct tty_struct *tty)
1700{ 1700{
1701 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1701 struct cyclades_port *info = tty->driver_data;
1702 1702
1703#ifdef SERIAL_DEBUG_OTHER 1703#ifdef SERIAL_DEBUG_OTHER
1704 printk("cy_hangup %s\n", tty->name); /* */ 1704 printk("cy_hangup %s\n", tty->name); /* */
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index a16b94f12eb2..3c67c3d83de9 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -1450,7 +1450,7 @@ static int sx_open(struct tty_struct *tty, struct file *filp)
1450 1450
1451static void sx_flush_buffer(struct tty_struct *tty) 1451static void sx_flush_buffer(struct tty_struct *tty)
1452{ 1452{
1453 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1453 struct specialix_port *port = tty->driver_data;
1454 unsigned long flags; 1454 unsigned long flags;
1455 struct specialix_board *bp; 1455 struct specialix_board *bp;
1456 1456
@@ -1472,7 +1472,7 @@ static void sx_flush_buffer(struct tty_struct *tty)
1472 1472
1473static void sx_close(struct tty_struct *tty, struct file *filp) 1473static void sx_close(struct tty_struct *tty, struct file *filp)
1474{ 1474{
1475 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1475 struct specialix_port *port = tty->driver_data;
1476 struct specialix_board *bp; 1476 struct specialix_board *bp;
1477 unsigned long flags; 1477 unsigned long flags;
1478 unsigned long timeout; 1478 unsigned long timeout;
@@ -1585,7 +1585,7 @@ static void sx_close(struct tty_struct *tty, struct file *filp)
1585static int sx_write(struct tty_struct *tty, 1585static int sx_write(struct tty_struct *tty,
1586 const unsigned char *buf, int count) 1586 const unsigned char *buf, int count)
1587{ 1587{
1588 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1588 struct specialix_port *port = tty->driver_data;
1589 struct specialix_board *bp; 1589 struct specialix_board *bp;
1590 int c, total = 0; 1590 int c, total = 0;
1591 unsigned long flags; 1591 unsigned long flags;
@@ -1637,7 +1637,7 @@ static int sx_write(struct tty_struct *tty,
1637 1637
1638static int sx_put_char(struct tty_struct *tty, unsigned char ch) 1638static int sx_put_char(struct tty_struct *tty, unsigned char ch)
1639{ 1639{
1640 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1640 struct specialix_port *port = tty->driver_data;
1641 unsigned long flags; 1641 unsigned long flags;
1642 struct specialix_board *bp; 1642 struct specialix_board *bp;
1643 1643
@@ -1676,7 +1676,7 @@ static int sx_put_char(struct tty_struct *tty, unsigned char ch)
1676 1676
1677static void sx_flush_chars(struct tty_struct *tty) 1677static void sx_flush_chars(struct tty_struct *tty)
1678{ 1678{
1679 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1679 struct specialix_port *port = tty->driver_data;
1680 unsigned long flags; 1680 unsigned long flags;
1681 struct specialix_board *bp = port_Board(port); 1681 struct specialix_board *bp = port_Board(port);
1682 1682
@@ -1703,7 +1703,7 @@ static void sx_flush_chars(struct tty_struct *tty)
1703 1703
1704static int sx_write_room(struct tty_struct *tty) 1704static int sx_write_room(struct tty_struct *tty)
1705{ 1705{
1706 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1706 struct specialix_port *port = tty->driver_data;
1707 int ret; 1707 int ret;
1708 1708
1709 func_enter(); 1709 func_enter();
@@ -1724,7 +1724,7 @@ static int sx_write_room(struct tty_struct *tty)
1724 1724
1725static int sx_chars_in_buffer(struct tty_struct *tty) 1725static int sx_chars_in_buffer(struct tty_struct *tty)
1726{ 1726{
1727 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1727 struct specialix_port *port = tty->driver_data;
1728 1728
1729 func_enter(); 1729 func_enter();
1730 1730
@@ -1738,7 +1738,7 @@ static int sx_chars_in_buffer(struct tty_struct *tty)
1738 1738
1739static int sx_tiocmget(struct tty_struct *tty, struct file *file) 1739static int sx_tiocmget(struct tty_struct *tty, struct file *file)
1740{ 1740{
1741 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1741 struct specialix_port *port = tty->driver_data;
1742 struct specialix_board *bp; 1742 struct specialix_board *bp;
1743 unsigned char status; 1743 unsigned char status;
1744 unsigned int result; 1744 unsigned int result;
@@ -1780,7 +1780,7 @@ static int sx_tiocmget(struct tty_struct *tty, struct file *file)
1780static int sx_tiocmset(struct tty_struct *tty, struct file *file, 1780static int sx_tiocmset(struct tty_struct *tty, struct file *file,
1781 unsigned int set, unsigned int clear) 1781 unsigned int set, unsigned int clear)
1782{ 1782{
1783 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1783 struct specialix_port *port = tty->driver_data;
1784 unsigned long flags; 1784 unsigned long flags;
1785 struct specialix_board *bp; 1785 struct specialix_board *bp;
1786 1786
@@ -1820,7 +1820,7 @@ static int sx_tiocmset(struct tty_struct *tty, struct file *file,
1820 1820
1821static int sx_send_break(struct tty_struct *tty, int length) 1821static int sx_send_break(struct tty_struct *tty, int length)
1822{ 1822{
1823 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1823 struct specialix_port *port = tty->driver_data;
1824 struct specialix_board *bp = port_Board(port); 1824 struct specialix_board *bp = port_Board(port);
1825 unsigned long flags; 1825 unsigned long flags;
1826 1826
@@ -1931,7 +1931,7 @@ static int sx_get_serial_info(struct specialix_port *port,
1931static int sx_ioctl(struct tty_struct *tty, struct file *filp, 1931static int sx_ioctl(struct tty_struct *tty, struct file *filp,
1932 unsigned int cmd, unsigned long arg) 1932 unsigned int cmd, unsigned long arg)
1933{ 1933{
1934 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1934 struct specialix_port *port = tty->driver_data;
1935 void __user *argp = (void __user *)arg; 1935 void __user *argp = (void __user *)arg;
1936 1936
1937 func_enter(); 1937 func_enter();
@@ -1959,7 +1959,7 @@ static int sx_ioctl(struct tty_struct *tty, struct file *filp,
1959 1959
1960static void sx_throttle(struct tty_struct *tty) 1960static void sx_throttle(struct tty_struct *tty)
1961{ 1961{
1962 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 1962 struct specialix_port *port = tty->driver_data;
1963 struct specialix_board *bp; 1963 struct specialix_board *bp;
1964 unsigned long flags; 1964 unsigned long flags;
1965 1965
@@ -2004,7 +2004,7 @@ static void sx_throttle(struct tty_struct *tty)
2004 2004
2005static void sx_unthrottle(struct tty_struct *tty) 2005static void sx_unthrottle(struct tty_struct *tty)
2006{ 2006{
2007 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 2007 struct specialix_port *port = tty->driver_data;
2008 struct specialix_board *bp; 2008 struct specialix_board *bp;
2009 unsigned long flags; 2009 unsigned long flags;
2010 2010
@@ -2045,7 +2045,7 @@ static void sx_unthrottle(struct tty_struct *tty)
2045 2045
2046static void sx_stop(struct tty_struct *tty) 2046static void sx_stop(struct tty_struct *tty)
2047{ 2047{
2048 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 2048 struct specialix_port *port = tty->driver_data;
2049 struct specialix_board *bp; 2049 struct specialix_board *bp;
2050 unsigned long flags; 2050 unsigned long flags;
2051 2051
@@ -2072,7 +2072,7 @@ static void sx_stop(struct tty_struct *tty)
2072 2072
2073static void sx_start(struct tty_struct *tty) 2073static void sx_start(struct tty_struct *tty)
2074{ 2074{
2075 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 2075 struct specialix_port *port = tty->driver_data;
2076 struct specialix_board *bp; 2076 struct specialix_board *bp;
2077 unsigned long flags; 2077 unsigned long flags;
2078 2078
@@ -2100,7 +2100,7 @@ static void sx_start(struct tty_struct *tty)
2100 2100
2101static void sx_hangup(struct tty_struct *tty) 2101static void sx_hangup(struct tty_struct *tty)
2102{ 2102{
2103 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 2103 struct specialix_port *port = tty->driver_data;
2104 struct specialix_board *bp; 2104 struct specialix_board *bp;
2105 unsigned long flags; 2105 unsigned long flags;
2106 2106
@@ -2135,7 +2135,7 @@ static void sx_hangup(struct tty_struct *tty)
2135static void sx_set_termios(struct tty_struct *tty, 2135static void sx_set_termios(struct tty_struct *tty,
2136 struct ktermios *old_termios) 2136 struct ktermios *old_termios)
2137{ 2137{
2138 struct specialix_port *port = (struct specialix_port *)tty->driver_data; 2138 struct specialix_port *port = tty->driver_data;
2139 unsigned long flags; 2139 unsigned long flags;
2140 struct specialix_board *bp; 2140 struct specialix_board *bp;
2141 2141
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index a71bc58abe7f..b60be7b0decf 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1941,7 +1941,7 @@ static int sx_ioctl(struct tty_struct *tty, struct file *filp,
1941 1941
1942static void sx_throttle(struct tty_struct *tty) 1942static void sx_throttle(struct tty_struct *tty)
1943{ 1943{
1944 struct sx_port *port = (struct sx_port *)tty->driver_data; 1944 struct sx_port *port = tty->driver_data;
1945 1945
1946 func_enter2(); 1946 func_enter2();
1947 /* If the port is using any type of input flow 1947 /* If the port is using any type of input flow
@@ -1955,7 +1955,7 @@ static void sx_throttle(struct tty_struct *tty)
1955 1955
1956static void sx_unthrottle(struct tty_struct *tty) 1956static void sx_unthrottle(struct tty_struct *tty)
1957{ 1957{
1958 struct sx_port *port = (struct sx_port *)tty->driver_data; 1958 struct sx_port *port = tty->driver_data;
1959 1959
1960 func_enter2(); 1960 func_enter2();
1961 /* Always unthrottle even if flow control is not enabled on 1961 /* Always unthrottle even if flow control is not enabled on
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index fbd5a5ce2e1c..b8063d4cad32 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -977,7 +977,7 @@ static void ldisc_receive_buf(struct tty_struct *tty,
977 */ 977 */
978static void mgsl_stop(struct tty_struct *tty) 978static void mgsl_stop(struct tty_struct *tty)
979{ 979{
980 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 980 struct mgsl_struct *info = tty->driver_data;
981 unsigned long flags; 981 unsigned long flags;
982 982
983 if (mgsl_paranoia_check(info, tty->name, "mgsl_stop")) 983 if (mgsl_paranoia_check(info, tty->name, "mgsl_stop"))
@@ -1000,7 +1000,7 @@ static void mgsl_stop(struct tty_struct *tty)
1000 */ 1000 */
1001static void mgsl_start(struct tty_struct *tty) 1001static void mgsl_start(struct tty_struct *tty)
1002{ 1002{
1003 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 1003 struct mgsl_struct *info = tty->driver_data;
1004 unsigned long flags; 1004 unsigned long flags;
1005 1005
1006 if (mgsl_paranoia_check(info, tty->name, "mgsl_start")) 1006 if (mgsl_paranoia_check(info, tty->name, "mgsl_start"))
@@ -2057,7 +2057,7 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
2057 */ 2057 */
2058static void mgsl_flush_chars(struct tty_struct *tty) 2058static void mgsl_flush_chars(struct tty_struct *tty)
2059{ 2059{
2060 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2060 struct mgsl_struct *info = tty->driver_data;
2061 unsigned long flags; 2061 unsigned long flags;
2062 2062
2063 if ( debug_level >= DEBUG_LEVEL_INFO ) 2063 if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -2109,7 +2109,7 @@ static int mgsl_write(struct tty_struct * tty,
2109 const unsigned char *buf, int count) 2109 const unsigned char *buf, int count)
2110{ 2110{
2111 int c, ret = 0; 2111 int c, ret = 0;
2112 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2112 struct mgsl_struct *info = tty->driver_data;
2113 unsigned long flags; 2113 unsigned long flags;
2114 2114
2115 if ( debug_level >= DEBUG_LEVEL_INFO ) 2115 if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -2232,7 +2232,7 @@ cleanup:
2232 */ 2232 */
2233static int mgsl_write_room(struct tty_struct *tty) 2233static int mgsl_write_room(struct tty_struct *tty)
2234{ 2234{
2235 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2235 struct mgsl_struct *info = tty->driver_data;
2236 int ret; 2236 int ret;
2237 2237
2238 if (mgsl_paranoia_check(info, tty->name, "mgsl_write_room")) 2238 if (mgsl_paranoia_check(info, tty->name, "mgsl_write_room"))
@@ -2267,7 +2267,7 @@ static int mgsl_write_room(struct tty_struct *tty)
2267 */ 2267 */
2268static int mgsl_chars_in_buffer(struct tty_struct *tty) 2268static int mgsl_chars_in_buffer(struct tty_struct *tty)
2269{ 2269{
2270 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2270 struct mgsl_struct *info = tty->driver_data;
2271 2271
2272 if (debug_level >= DEBUG_LEVEL_INFO) 2272 if (debug_level >= DEBUG_LEVEL_INFO)
2273 printk("%s(%d):mgsl_chars_in_buffer(%s)\n", 2273 printk("%s(%d):mgsl_chars_in_buffer(%s)\n",
@@ -2301,7 +2301,7 @@ static int mgsl_chars_in_buffer(struct tty_struct *tty)
2301 */ 2301 */
2302static void mgsl_flush_buffer(struct tty_struct *tty) 2302static void mgsl_flush_buffer(struct tty_struct *tty)
2303{ 2303{
2304 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2304 struct mgsl_struct *info = tty->driver_data;
2305 unsigned long flags; 2305 unsigned long flags;
2306 2306
2307 if (debug_level >= DEBUG_LEVEL_INFO) 2307 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2329,7 +2329,7 @@ static void mgsl_flush_buffer(struct tty_struct *tty)
2329 */ 2329 */
2330static void mgsl_send_xchar(struct tty_struct *tty, char ch) 2330static void mgsl_send_xchar(struct tty_struct *tty, char ch)
2331{ 2331{
2332 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2332 struct mgsl_struct *info = tty->driver_data;
2333 unsigned long flags; 2333 unsigned long flags;
2334 2334
2335 if (debug_level >= DEBUG_LEVEL_INFO) 2335 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2358,7 +2358,7 @@ static void mgsl_send_xchar(struct tty_struct *tty, char ch)
2358 */ 2358 */
2359static void mgsl_throttle(struct tty_struct * tty) 2359static void mgsl_throttle(struct tty_struct * tty)
2360{ 2360{
2361 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2361 struct mgsl_struct *info = tty->driver_data;
2362 unsigned long flags; 2362 unsigned long flags;
2363 2363
2364 if (debug_level >= DEBUG_LEVEL_INFO) 2364 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2388,7 +2388,7 @@ static void mgsl_throttle(struct tty_struct * tty)
2388 */ 2388 */
2389static void mgsl_unthrottle(struct tty_struct * tty) 2389static void mgsl_unthrottle(struct tty_struct * tty)
2390{ 2390{
2391 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2391 struct mgsl_struct *info = tty->driver_data;
2392 unsigned long flags; 2392 unsigned long flags;
2393 2393
2394 if (debug_level >= DEBUG_LEVEL_INFO) 2394 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2841,7 +2841,7 @@ static int modem_input_wait(struct mgsl_struct *info,int arg)
2841 */ 2841 */
2842static int tiocmget(struct tty_struct *tty, struct file *file) 2842static int tiocmget(struct tty_struct *tty, struct file *file)
2843{ 2843{
2844 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2844 struct mgsl_struct *info = tty->driver_data;
2845 unsigned int result; 2845 unsigned int result;
2846 unsigned long flags; 2846 unsigned long flags;
2847 2847
@@ -2867,7 +2867,7 @@ static int tiocmget(struct tty_struct *tty, struct file *file)
2867static int tiocmset(struct tty_struct *tty, struct file *file, 2867static int tiocmset(struct tty_struct *tty, struct file *file,
2868 unsigned int set, unsigned int clear) 2868 unsigned int set, unsigned int clear)
2869{ 2869{
2870 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 2870 struct mgsl_struct *info = tty->driver_data;
2871 unsigned long flags; 2871 unsigned long flags;
2872 2872
2873 if (debug_level >= DEBUG_LEVEL_INFO) 2873 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2898,7 +2898,7 @@ static int tiocmset(struct tty_struct *tty, struct file *file,
2898 */ 2898 */
2899static int mgsl_break(struct tty_struct *tty, int break_state) 2899static int mgsl_break(struct tty_struct *tty, int break_state)
2900{ 2900{
2901 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 2901 struct mgsl_struct * info = tty->driver_data;
2902 unsigned long flags; 2902 unsigned long flags;
2903 2903
2904 if (debug_level >= DEBUG_LEVEL_INFO) 2904 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -2932,7 +2932,7 @@ static int mgsl_break(struct tty_struct *tty, int break_state)
2932static int mgsl_ioctl(struct tty_struct *tty, struct file * file, 2932static int mgsl_ioctl(struct tty_struct *tty, struct file * file,
2933 unsigned int cmd, unsigned long arg) 2933 unsigned int cmd, unsigned long arg)
2934{ 2934{
2935 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 2935 struct mgsl_struct * info = tty->driver_data;
2936 int ret; 2936 int ret;
2937 2937
2938 if (debug_level >= DEBUG_LEVEL_INFO) 2938 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -3042,7 +3042,7 @@ static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigne
3042 */ 3042 */
3043static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termios) 3043static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
3044{ 3044{
3045 struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; 3045 struct mgsl_struct *info = tty->driver_data;
3046 unsigned long flags; 3046 unsigned long flags;
3047 3047
3048 if (debug_level >= DEBUG_LEVEL_INFO) 3048 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -3096,7 +3096,7 @@ static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termio
3096 */ 3096 */
3097static void mgsl_close(struct tty_struct *tty, struct file * filp) 3097static void mgsl_close(struct tty_struct *tty, struct file * filp)
3098{ 3098{
3099 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 3099 struct mgsl_struct * info = tty->driver_data;
3100 3100
3101 if (mgsl_paranoia_check(info, tty->name, "mgsl_close")) 3101 if (mgsl_paranoia_check(info, tty->name, "mgsl_close"))
3102 return; 3102 return;
@@ -3136,7 +3136,7 @@ cleanup:
3136 */ 3136 */
3137static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout) 3137static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout)
3138{ 3138{
3139 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 3139 struct mgsl_struct * info = tty->driver_data;
3140 unsigned long orig_jiffies, char_time; 3140 unsigned long orig_jiffies, char_time;
3141 3141
3142 if (!info ) 3142 if (!info )
@@ -3209,7 +3209,7 @@ exit:
3209 */ 3209 */
3210static void mgsl_hangup(struct tty_struct *tty) 3210static void mgsl_hangup(struct tty_struct *tty)
3211{ 3211{
3212 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 3212 struct mgsl_struct * info = tty->driver_data;
3213 3213
3214 if (debug_level >= DEBUG_LEVEL_INFO) 3214 if (debug_level >= DEBUG_LEVEL_INFO)
3215 printk("%s(%d):mgsl_hangup(%s)\n", 3215 printk("%s(%d):mgsl_hangup(%s)\n",
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 2aac55bcf5fd..7b0c5b2dd263 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -801,7 +801,7 @@ cleanup:
801 */ 801 */
802static void close(struct tty_struct *tty, struct file *filp) 802static void close(struct tty_struct *tty, struct file *filp)
803{ 803{
804 SLMP_INFO * info = (SLMP_INFO *)tty->driver_data; 804 SLMP_INFO * info = tty->driver_data;
805 805
806 if (sanity_check(info, tty->name, "close")) 806 if (sanity_check(info, tty->name, "close"))
807 return; 807 return;
@@ -833,7 +833,7 @@ cleanup:
833 */ 833 */
834static void hangup(struct tty_struct *tty) 834static void hangup(struct tty_struct *tty)
835{ 835{
836 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 836 SLMP_INFO *info = tty->driver_data;
837 837
838 if (debug_level >= DEBUG_LEVEL_INFO) 838 if (debug_level >= DEBUG_LEVEL_INFO)
839 printk("%s(%d):%s hangup()\n", 839 printk("%s(%d):%s hangup()\n",
@@ -856,7 +856,7 @@ static void hangup(struct tty_struct *tty)
856 */ 856 */
857static void set_termios(struct tty_struct *tty, struct ktermios *old_termios) 857static void set_termios(struct tty_struct *tty, struct ktermios *old_termios)
858{ 858{
859 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 859 SLMP_INFO *info = tty->driver_data;
860 unsigned long flags; 860 unsigned long flags;
861 861
862 if (debug_level >= DEBUG_LEVEL_INFO) 862 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -909,7 +909,7 @@ static int write(struct tty_struct *tty,
909 const unsigned char *buf, int count) 909 const unsigned char *buf, int count)
910{ 910{
911 int c, ret = 0; 911 int c, ret = 0;
912 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 912 SLMP_INFO *info = tty->driver_data;
913 unsigned long flags; 913 unsigned long flags;
914 914
915 if (debug_level >= DEBUG_LEVEL_INFO) 915 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -987,7 +987,7 @@ cleanup:
987 */ 987 */
988static int put_char(struct tty_struct *tty, unsigned char ch) 988static int put_char(struct tty_struct *tty, unsigned char ch)
989{ 989{
990 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 990 SLMP_INFO *info = tty->driver_data;
991 unsigned long flags; 991 unsigned long flags;
992 int ret = 0; 992 int ret = 0;
993 993
@@ -1024,7 +1024,7 @@ static int put_char(struct tty_struct *tty, unsigned char ch)
1024 */ 1024 */
1025static void send_xchar(struct tty_struct *tty, char ch) 1025static void send_xchar(struct tty_struct *tty, char ch)
1026{ 1026{
1027 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1027 SLMP_INFO *info = tty->driver_data;
1028 unsigned long flags; 1028 unsigned long flags;
1029 1029
1030 if (debug_level >= DEBUG_LEVEL_INFO) 1030 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1048,7 +1048,7 @@ static void send_xchar(struct tty_struct *tty, char ch)
1048 */ 1048 */
1049static void wait_until_sent(struct tty_struct *tty, int timeout) 1049static void wait_until_sent(struct tty_struct *tty, int timeout)
1050{ 1050{
1051 SLMP_INFO * info = (SLMP_INFO *)tty->driver_data; 1051 SLMP_INFO * info = tty->driver_data;
1052 unsigned long orig_jiffies, char_time; 1052 unsigned long orig_jiffies, char_time;
1053 1053
1054 if (!info ) 1054 if (!info )
@@ -1115,7 +1115,7 @@ exit:
1115 */ 1115 */
1116static int write_room(struct tty_struct *tty) 1116static int write_room(struct tty_struct *tty)
1117{ 1117{
1118 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1118 SLMP_INFO *info = tty->driver_data;
1119 int ret; 1119 int ret;
1120 1120
1121 if (sanity_check(info, tty->name, "write_room")) 1121 if (sanity_check(info, tty->name, "write_room"))
@@ -1142,7 +1142,7 @@ static int write_room(struct tty_struct *tty)
1142 */ 1142 */
1143static void flush_chars(struct tty_struct *tty) 1143static void flush_chars(struct tty_struct *tty)
1144{ 1144{
1145 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1145 SLMP_INFO *info = tty->driver_data;
1146 unsigned long flags; 1146 unsigned long flags;
1147 1147
1148 if ( debug_level >= DEBUG_LEVEL_INFO ) 1148 if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -1181,7 +1181,7 @@ static void flush_chars(struct tty_struct *tty)
1181 */ 1181 */
1182static void flush_buffer(struct tty_struct *tty) 1182static void flush_buffer(struct tty_struct *tty)
1183{ 1183{
1184 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1184 SLMP_INFO *info = tty->driver_data;
1185 unsigned long flags; 1185 unsigned long flags;
1186 1186
1187 if (debug_level >= DEBUG_LEVEL_INFO) 1187 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1203,7 +1203,7 @@ static void flush_buffer(struct tty_struct *tty)
1203 */ 1203 */
1204static void tx_hold(struct tty_struct *tty) 1204static void tx_hold(struct tty_struct *tty)
1205{ 1205{
1206 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1206 SLMP_INFO *info = tty->driver_data;
1207 unsigned long flags; 1207 unsigned long flags;
1208 1208
1209 if (sanity_check(info, tty->name, "tx_hold")) 1209 if (sanity_check(info, tty->name, "tx_hold"))
@@ -1223,7 +1223,7 @@ static void tx_hold(struct tty_struct *tty)
1223 */ 1223 */
1224static void tx_release(struct tty_struct *tty) 1224static void tx_release(struct tty_struct *tty)
1225{ 1225{
1226 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1226 SLMP_INFO *info = tty->driver_data;
1227 unsigned long flags; 1227 unsigned long flags;
1228 1228
1229 if (sanity_check(info, tty->name, "tx_release")) 1229 if (sanity_check(info, tty->name, "tx_release"))
@@ -1253,7 +1253,7 @@ static void tx_release(struct tty_struct *tty)
1253static int do_ioctl(struct tty_struct *tty, struct file *file, 1253static int do_ioctl(struct tty_struct *tty, struct file *file,
1254 unsigned int cmd, unsigned long arg) 1254 unsigned int cmd, unsigned long arg)
1255{ 1255{
1256 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1256 SLMP_INFO *info = tty->driver_data;
1257 int error; 1257 int error;
1258 struct mgsl_icount cnow; /* kernel counter temps */ 1258 struct mgsl_icount cnow; /* kernel counter temps */
1259 struct serial_icounter_struct __user *p_cuser; /* user space */ 1259 struct serial_icounter_struct __user *p_cuser; /* user space */
@@ -1464,7 +1464,7 @@ done:
1464 */ 1464 */
1465static int chars_in_buffer(struct tty_struct *tty) 1465static int chars_in_buffer(struct tty_struct *tty)
1466{ 1466{
1467 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1467 SLMP_INFO *info = tty->driver_data;
1468 1468
1469 if (sanity_check(info, tty->name, "chars_in_buffer")) 1469 if (sanity_check(info, tty->name, "chars_in_buffer"))
1470 return 0; 1470 return 0;
@@ -1480,7 +1480,7 @@ static int chars_in_buffer(struct tty_struct *tty)
1480 */ 1480 */
1481static void throttle(struct tty_struct * tty) 1481static void throttle(struct tty_struct * tty)
1482{ 1482{
1483 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1483 SLMP_INFO *info = tty->driver_data;
1484 unsigned long flags; 1484 unsigned long flags;
1485 1485
1486 if (debug_level >= DEBUG_LEVEL_INFO) 1486 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1505,7 +1505,7 @@ static void throttle(struct tty_struct * tty)
1505 */ 1505 */
1506static void unthrottle(struct tty_struct * tty) 1506static void unthrottle(struct tty_struct * tty)
1507{ 1507{
1508 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 1508 SLMP_INFO *info = tty->driver_data;
1509 unsigned long flags; 1509 unsigned long flags;
1510 1510
1511 if (debug_level >= DEBUG_LEVEL_INFO) 1511 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -1536,7 +1536,7 @@ static void unthrottle(struct tty_struct * tty)
1536static int set_break(struct tty_struct *tty, int break_state) 1536static int set_break(struct tty_struct *tty, int break_state)
1537{ 1537{
1538 unsigned char RegValue; 1538 unsigned char RegValue;
1539 SLMP_INFO * info = (SLMP_INFO *)tty->driver_data; 1539 SLMP_INFO * info = tty->driver_data;
1540 unsigned long flags; 1540 unsigned long flags;
1541 1541
1542 if (debug_level >= DEBUG_LEVEL_INFO) 1542 if (debug_level >= DEBUG_LEVEL_INFO)
@@ -3218,7 +3218,7 @@ static int modem_input_wait(SLMP_INFO *info,int arg)
3218 */ 3218 */
3219static int tiocmget(struct tty_struct *tty, struct file *file) 3219static int tiocmget(struct tty_struct *tty, struct file *file)
3220{ 3220{
3221 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 3221 SLMP_INFO *info = tty->driver_data;
3222 unsigned int result; 3222 unsigned int result;
3223 unsigned long flags; 3223 unsigned long flags;
3224 3224
@@ -3244,7 +3244,7 @@ static int tiocmget(struct tty_struct *tty, struct file *file)
3244static int tiocmset(struct tty_struct *tty, struct file *file, 3244static int tiocmset(struct tty_struct *tty, struct file *file,
3245 unsigned int set, unsigned int clear) 3245 unsigned int set, unsigned int clear)
3246{ 3246{
3247 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; 3247 SLMP_INFO *info = tty->driver_data;
3248 unsigned long flags; 3248 unsigned long flags;
3249 3249
3250 if (debug_level >= DEBUG_LEVEL_INFO) 3250 if (debug_level >= DEBUG_LEVEL_INFO)
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c
index 2d9242a45a0d..0e8234bd0e19 100644
--- a/drivers/char/vme_scc.c
+++ b/drivers/char/vme_scc.c
@@ -784,7 +784,7 @@ static void scc_setsignals(struct scc_port *port, int dtr, int rts)
784 784
785static void scc_send_xchar(struct tty_struct *tty, char ch) 785static void scc_send_xchar(struct tty_struct *tty, char ch)
786{ 786{
787 struct scc_port *port = (struct scc_port *)tty->driver_data; 787 struct scc_port *port = tty->driver_data;
788 788
789 port->x_char = ch; 789 port->x_char = ch;
790 if (ch) 790 if (ch)
@@ -911,7 +911,7 @@ static int scc_open (struct tty_struct * tty, struct file * filp)
911 911
912static void scc_throttle (struct tty_struct * tty) 912static void scc_throttle (struct tty_struct * tty)
913{ 913{
914 struct scc_port *port = (struct scc_port *)tty->driver_data; 914 struct scc_port *port = tty->driver_data;
915 unsigned long flags; 915 unsigned long flags;
916 SCC_ACCESS_INIT(port); 916 SCC_ACCESS_INIT(port);
917 917
@@ -927,7 +927,7 @@ static void scc_throttle (struct tty_struct * tty)
927 927
928static void scc_unthrottle (struct tty_struct * tty) 928static void scc_unthrottle (struct tty_struct * tty)
929{ 929{
930 struct scc_port *port = (struct scc_port *)tty->driver_data; 930 struct scc_port *port = tty->driver_data;
931 unsigned long flags; 931 unsigned long flags;
932 SCC_ACCESS_INIT(port); 932 SCC_ACCESS_INIT(port);
933 933
@@ -950,7 +950,7 @@ static int scc_ioctl(struct tty_struct *tty, struct file *file,
950 950
951static int scc_break_ctl(struct tty_struct *tty, int break_state) 951static int scc_break_ctl(struct tty_struct *tty, int break_state)
952{ 952{
953 struct scc_port *port = (struct scc_port *)tty->driver_data; 953 struct scc_port *port = tty->driver_data;
954 unsigned long flags; 954 unsigned long flags;
955 SCC_ACCESS_INIT(port); 955 SCC_ACCESS_INIT(port);
956 956
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 8944ce508e2f..a2dee0eb6dad 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -366,7 +366,7 @@ do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_
366int vt_ioctl(struct tty_struct *tty, struct file * file, 366int vt_ioctl(struct tty_struct *tty, struct file * file,
367 unsigned int cmd, unsigned long arg) 367 unsigned int cmd, unsigned long arg)
368{ 368{
369 struct vc_data *vc = (struct vc_data *)tty->driver_data; 369 struct vc_data *vc = tty->driver_data;
370 struct console_font_op op; /* used in multiple places here */ 370 struct console_font_op op; /* used in multiple places here */
371 struct kbd_struct * kbd; 371 struct kbd_struct * kbd;
372 unsigned int console; 372 unsigned int console;