X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fnet%2Fctctty.c;h=a4fda34df7498703c715cf67435798b5444cb273;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=2806b2d156c369abb2362f9037cd58199b63855a;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/s390/net/ctctty.c b/drivers/s390/net/ctctty.c index 2806b2d15..a4fda34df 100644 --- a/drivers/s390/net/ctctty.c +++ b/drivers/s390/net/ctctty.c @@ -489,7 +489,7 @@ ctc_tty_shutdown(ctc_tty_info * info) * - If dialing, abort dial. */ static int -ctc_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int count) +ctc_tty_write(struct tty_struct *tty, const u_char * buf, int count) { int c; int total = 0; @@ -506,8 +506,6 @@ ctc_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int cou total = -ENODEV; goto ex; } - if (from_user) - down(&info->write_sem); while (1) { struct sk_buff *skb; int skb_res; @@ -526,11 +524,7 @@ ctc_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int cou break; } skb_reserve(skb, skb_res); - if (from_user) - copy_from_user(skb_put(skb, c), - (const u_char __user *)buf, c); - else - memcpy(skb_put(skb, c), buf, c); + memcpy(skb_put(skb, c), buf, c); skb_queue_tail(&info->tx_queue, skb); buf += c; total += c; @@ -540,8 +534,6 @@ ctc_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int cou info->lsr &= ~UART_LSR_TEMT; tasklet_schedule(&info->tasklet); } - if (from_user) - up(&info->write_sem); ex: DBF_TEXT(trace, 6, __FUNCTION__); return total;