equal
deleted
inserted
replaced
106 unsigned int rx_write_idx; |
106 unsigned int rx_write_idx; |
107 |
107 |
108 struct timer_list timer; |
108 struct timer_list timer; |
109 struct tty_struct *tty; |
109 struct tty_struct *tty; |
110 |
110 |
111 int (*cflag_cb)(void *, unsigned short); |
111 int (*cflag_cb)(void *, tcflag_t); |
112 void *cb_data; |
112 void *cb_data; |
113 }; |
113 }; |
114 |
114 |
115 static const struct tty_operations ec_tty_ops; // see below |
115 static const struct tty_operations ec_tty_ops; // see below |
116 |
116 |
276 } |
276 } |
277 |
277 |
278 /*****************************************************************************/ |
278 /*****************************************************************************/ |
279 |
279 |
280 int ec_tty_init(ec_tty_t *tty, int minor, |
280 int ec_tty_init(ec_tty_t *tty, int minor, |
281 int (*cflag_cb)(void *, unsigned short), void *cb_data) |
281 int (*cflag_cb)(void *, tcflag_t), void *cb_data) |
282 { |
282 { |
283 tty->minor = minor; |
283 tty->minor = minor; |
284 tty->tx_read_idx = 0; |
284 tty->tx_read_idx = 0; |
285 tty->tx_write_idx = 0; |
285 tty->tx_write_idx = 0; |
286 tty->wakeup = 0; |
286 tty->wakeup = 0; |
637 |
637 |
638 /****************************************************************************** |
638 /****************************************************************************** |
639 * Public functions and methods |
639 * Public functions and methods |
640 *****************************************************************************/ |
640 *****************************************************************************/ |
641 |
641 |
642 ec_tty_t *ectty_create(int (*cflag_cb)(void *, unsigned short), void *cb_data) |
642 ec_tty_t *ectty_create(int (*cflag_cb)(void *, tcflag_t), void *cb_data) |
643 { |
643 { |
644 ec_tty_t *tty; |
644 ec_tty_t *tty; |
645 int minor, ret; |
645 int minor, ret; |
646 |
646 |
647 if (down_interruptible(&tty_sem)) { |
647 if (down_interruptible(&tty_sem)) { |