aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/riointr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio/riointr.c')
-rw-r--r--drivers/char/rio/riointr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
index e42e7b50bf6b..ddda9c14e059 100644
--- a/drivers/char/rio/riointr.c
+++ b/drivers/char/rio/riointr.c
@@ -38,6 +38,7 @@ static char *_riointr_c_sccs_ = "@(#)riointr.c 1.2";
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/errno.h> 39#include <linux/errno.h>
40#include <linux/tty.h> 40#include <linux/tty.h>
41#include <linux/tty_flip.h>
41#include <asm/io.h> 42#include <asm/io.h>
42#include <asm/system.h> 43#include <asm/system.h>
43#include <asm/string.h> 44#include <asm/string.h>
@@ -560,6 +561,7 @@ struct Port * PortP;
560 struct PKT *PacketP; 561 struct PKT *PacketP;
561 register uint DataCnt; 562 register uint DataCnt;
562 uchar * ptr; 563 uchar * ptr;
564 unsigned char *buf;
563 int copied =0; 565 int copied =0;
564 566
565 static int intCount, RxIntCnt; 567 static int intCount, RxIntCnt;
@@ -657,8 +659,7 @@ struct Port * PortP;
657 ** and available space. 659 ** and available space.
658 */ 660 */
659 661
660 transCount = min_t(unsigned int, PacketP->len & PKT_LEN_MASK, 662 transCount = tty_buffer_request_room(TtyP, PacketP->len & PKT_LEN_MASK);
661 TTY_FLIPBUF_SIZE - TtyP->flip.count);
662 rio_dprintk (RIO_DEBUG_REC, "port %d: Copy %d bytes\n", 663 rio_dprintk (RIO_DEBUG_REC, "port %d: Copy %d bytes\n",
663 PortP->PortNum, transCount); 664 PortP->PortNum, transCount);
664 /* 665 /*
@@ -678,9 +679,8 @@ struct Port * PortP;
678#endif 679#endif
679 ptr = (uchar *) PacketP->data + PortP->RxDataStart; 680 ptr = (uchar *) PacketP->data + PortP->RxDataStart;
680 681
681 rio_memcpy_fromio (TtyP->flip.char_buf_ptr, ptr, transCount); 682 tty_prepare_flip_string(TtyP, &buf, transCount);
682 memset(TtyP->flip.flag_buf_ptr, TTY_NORMAL, transCount); 683 rio_memcpy_fromio (buf, ptr, transCount);
683
684#ifdef STATS 684#ifdef STATS
685 /* 685 /*
686 ** keep a count for statistical purposes 686 ** keep a count for statistical purposes
@@ -690,9 +690,6 @@ struct Port * PortP;
690 PortP->RxDataStart += transCount; 690 PortP->RxDataStart += transCount;
691 PacketP->len -= transCount; 691 PacketP->len -= transCount;
692 copied += transCount; 692 copied += transCount;
693 TtyP->flip.count += transCount;
694 TtyP->flip.char_buf_ptr += transCount;
695 TtyP->flip.flag_buf_ptr += transCount;
696 693
697 694
698#ifdef ___DEBUG_IT___ 695#ifdef ___DEBUG_IT___