diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/irda/ircomm/ircomm_tty.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'net/irda/ircomm/ircomm_tty.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index faa82ca2dfdc..b3cc8b3989a9 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
39 | #include <linux/termios.h> | 39 | #include <linux/termios.h> |
40 | #include <linux/tty.h> | 40 | #include <linux/tty.h> |
41 | #include <linux/tty_flip.h> | ||
41 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
42 | #include <linux/device.h> /* for MODULE_ALIAS_CHARDEV_MAJOR */ | 43 | #include <linux/device.h> /* for MODULE_ALIAS_CHARDEV_MAJOR */ |
43 | 44 | ||
@@ -449,8 +450,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
449 | } | 450 | } |
450 | 451 | ||
451 | #ifdef SERIAL_DO_RESTART | 452 | #ifdef SERIAL_DO_RESTART |
452 | return ((self->flags & ASYNC_HUP_NOTIFY) ? | 453 | return (self->flags & ASYNC_HUP_NOTIFY) ? |
453 | -EAGAIN : -ERESTARTSYS); | 454 | -EAGAIN : -ERESTARTSYS; |
454 | #else | 455 | #else |
455 | return -EAGAIN; | 456 | return -EAGAIN; |
456 | #endif | 457 | #endif |
@@ -1132,7 +1133,6 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1132 | struct sk_buff *skb) | 1133 | struct sk_buff *skb) |
1133 | { | 1134 | { |
1134 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 1135 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
1135 | struct tty_ldisc *ld; | ||
1136 | 1136 | ||
1137 | IRDA_DEBUG(2, "%s()\n", __func__ ); | 1137 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
1138 | 1138 | ||
@@ -1161,15 +1161,11 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | /* | 1163 | /* |
1164 | * Just give it over to the line discipline. There is no need to | 1164 | * Use flip buffer functions since the code may be called from interrupt |
1165 | * involve the flip buffers, since we are not running in an interrupt | 1165 | * context |
1166 | * handler | ||
1167 | */ | 1166 | */ |
1168 | 1167 | tty_insert_flip_string(self->tty, skb->data, skb->len); | |
1169 | ld = tty_ldisc_ref(self->tty); | 1168 | tty_flip_buffer_push(self->tty); |
1170 | if (ld) | ||
1171 | ld->ops->receive_buf(self->tty, skb->data, NULL, skb->len); | ||
1172 | tty_ldisc_deref(ld); | ||
1173 | 1169 | ||
1174 | /* No need to kfree_skb - see ircomm_ttp_data_indication() */ | 1170 | /* No need to kfree_skb - see ircomm_ttp_data_indication() */ |
1175 | 1171 | ||