aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ip2/i2lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ip2/i2lib.c')
-rw-r--r--drivers/char/ip2/i2lib.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c
index fc944d375be7..54d93f0345e8 100644
--- a/drivers/char/ip2/i2lib.c
+++ b/drivers/char/ip2/i2lib.c
@@ -1007,7 +1007,7 @@ i2InputAvailable(i2ChanStrPtr pCh)
1007// applications that one cannot break out of. 1007// applications that one cannot break out of.
1008//****************************************************************************** 1008//******************************************************************************
1009static int 1009static int
1010i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user ) 1010i2Output(i2ChanStrPtr pCh, const char *pSource, int count)
1011{ 1011{
1012 i2eBordStrPtr pB; 1012 i2eBordStrPtr pB;
1013 unsigned char *pInsert; 1013 unsigned char *pInsert;
@@ -1020,7 +1020,7 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
1020 1020
1021 int bailout = 10; 1021 int bailout = 10;
1022 1022
1023 ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, user ); 1023 ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, 0 );
1024 1024
1025 // Ensure channel structure seems real 1025 // Ensure channel structure seems real
1026 if ( !i2Validate ( pCh ) ) 1026 if ( !i2Validate ( pCh ) )
@@ -1087,12 +1087,7 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
1087 DATA_COUNT_OF(pInsert) = amountToMove; 1087 DATA_COUNT_OF(pInsert) = amountToMove;
1088 1088
1089 // Move the data 1089 // Move the data
1090 if ( user ) { 1090 memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );
1091 rc = copy_from_user((char*)(DATA_OF(pInsert)), pSource,
1092 amountToMove );
1093 } else {
1094 memcpy( (char*)(DATA_OF(pInsert)), pSource, amountToMove );
1095 }
1096 // Adjust pointers and indices 1091 // Adjust pointers and indices
1097 pSource += amountToMove; 1092 pSource += amountToMove;
1098 pCh->Obuf_char_count += amountToMove; 1093 pCh->Obuf_char_count += amountToMove;