aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 8b316953173d..f391a24a1b44 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -234,7 +234,7 @@ static void moxa_put_char(struct tty_struct *, unsigned char);
234static int moxa_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long); 234static int moxa_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long);
235static void moxa_throttle(struct tty_struct *); 235static void moxa_throttle(struct tty_struct *);
236static void moxa_unthrottle(struct tty_struct *); 236static void moxa_unthrottle(struct tty_struct *);
237static void moxa_set_termios(struct tty_struct *, struct termios *); 237static void moxa_set_termios(struct tty_struct *, struct ktermios *);
238static void moxa_stop(struct tty_struct *); 238static void moxa_stop(struct tty_struct *);
239static void moxa_start(struct tty_struct *); 239static void moxa_start(struct tty_struct *);
240static void moxa_hangup(struct tty_struct *); 240static void moxa_hangup(struct tty_struct *);
@@ -261,7 +261,7 @@ static void MoxaPortEnable(int);
261static void MoxaPortDisable(int); 261static void MoxaPortDisable(int);
262static long MoxaPortGetMaxBaud(int); 262static long MoxaPortGetMaxBaud(int);
263static long MoxaPortSetBaud(int, long); 263static long MoxaPortSetBaud(int, long);
264static int MoxaPortSetTermio(int, struct termios *, speed_t); 264static int MoxaPortSetTermio(int, struct ktermios *, speed_t);
265static int MoxaPortGetLineOut(int, int *, int *); 265static int MoxaPortGetLineOut(int, int *, int *);
266static void MoxaPortLineCtrl(int, int, int); 266static void MoxaPortLineCtrl(int, int, int);
267static void MoxaPortFlowCtrl(int, int, int, int, int, int); 267static void MoxaPortFlowCtrl(int, int, int, int, int, int);
@@ -355,6 +355,8 @@ static int __init moxa_init(void)
355 moxaDriver->init_termios.c_oflag = 0; 355 moxaDriver->init_termios.c_oflag = 0;
356 moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; 356 moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
357 moxaDriver->init_termios.c_lflag = 0; 357 moxaDriver->init_termios.c_lflag = 0;
358 moxaDriver->init_termios.c_ispeed = 9600;
359 moxaDriver->init_termios.c_ospeed = 9600;
358 moxaDriver->flags = TTY_DRIVER_REAL_RAW; 360 moxaDriver->flags = TTY_DRIVER_REAL_RAW;
359 tty_set_operations(moxaDriver, &moxa_ops); 361 tty_set_operations(moxaDriver, &moxa_ops);
360 362
@@ -864,7 +866,7 @@ static void moxa_unthrottle(struct tty_struct *tty)
864} 866}
865 867
866static void moxa_set_termios(struct tty_struct *tty, 868static void moxa_set_termios(struct tty_struct *tty,
867 struct termios *old_termios) 869 struct ktermios *old_termios)
868{ 870{
869 struct moxa_str *ch = (struct moxa_str *) tty->driver_data; 871 struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
870 872
@@ -978,7 +980,7 @@ static void moxa_poll(unsigned long ignored)
978 980
979static void set_tty_param(struct tty_struct *tty) 981static void set_tty_param(struct tty_struct *tty)
980{ 982{
981 register struct termios *ts; 983 register struct ktermios *ts;
982 struct moxa_str *ch; 984 struct moxa_str *ch;
983 int rts, cts, txflow, rxflow, xany; 985 int rts, cts, txflow, rxflow, xany;
984 986
@@ -1149,7 +1151,7 @@ static void shut_down(struct moxa_str *ch)
1149static void receive_data(struct moxa_str *ch) 1151static void receive_data(struct moxa_str *ch)
1150{ 1152{
1151 struct tty_struct *tp; 1153 struct tty_struct *tp;
1152 struct termios *ts; 1154 struct ktermios *ts;
1153 unsigned long flags; 1155 unsigned long flags;
1154 1156
1155 ts = NULL; 1157 ts = NULL;
@@ -1912,9 +1914,9 @@ int MoxaPortsOfCard(int cardno)
1912 * 1914 *
1913 * Function 12: Configure the port. 1915 * Function 12: Configure the port.
1914 * Syntax: 1916 * Syntax:
1915 * int MoxaPortSetTermio(int port, struct termios *termio, speed_t baud); 1917 * int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud);
1916 * int port : port number (0 - 127) 1918 * int port : port number (0 - 127)
1917 * struct termios * termio : termio structure pointer 1919 * struct ktermios * termio : termio structure pointer
1918 * speed_t baud : baud rate 1920 * speed_t baud : baud rate
1919 * 1921 *
1920 * return: -1 : this port is invalid or termio == NULL 1922 * return: -1 : this port is invalid or termio == NULL
@@ -2195,7 +2197,7 @@ long MoxaPortSetBaud(int port, long baud)
2195 return (baud); 2197 return (baud);
2196} 2198}
2197 2199
2198int MoxaPortSetTermio(int port, struct termios *termio, speed_t baud) 2200int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud)
2199{ 2201{
2200 void __iomem *ofsAddr; 2202 void __iomem *ofsAddr;
2201 tcflag_t cflag; 2203 tcflag_t cflag;