diff options
Diffstat (limited to 'drivers/char/ip2/i2lib.c')
-rw-r--r-- | drivers/char/ip2/i2lib.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c index fc944d375be7..78045767ec33 100644 --- a/drivers/char/ip2/i2lib.c +++ b/drivers/char/ip2/i2lib.c | |||
@@ -84,8 +84,8 @@ static void iiSendPendingMail(i2eBordStrPtr); | |||
84 | static void serviceOutgoingFifo(i2eBordStrPtr); | 84 | static void serviceOutgoingFifo(i2eBordStrPtr); |
85 | 85 | ||
86 | // Functions defined in ip2.c as part of interrupt handling | 86 | // Functions defined in ip2.c as part of interrupt handling |
87 | static void do_input(void *); | 87 | static void do_input(struct work_struct *); |
88 | static void do_status(void *); | 88 | static void do_status(struct work_struct *); |
89 | 89 | ||
90 | //*************** | 90 | //*************** |
91 | //* Debug Data * | 91 | //* Debug Data * |
@@ -331,8 +331,8 @@ i2InitChannels ( i2eBordStrPtr pB, int nChannels, i2ChanStrPtr pCh) | |||
331 | pCh->ClosingWaitTime = 30*HZ; | 331 | pCh->ClosingWaitTime = 30*HZ; |
332 | 332 | ||
333 | // Initialize task queue objects | 333 | // Initialize task queue objects |
334 | INIT_WORK(&pCh->tqueue_input, do_input, pCh); | 334 | INIT_WORK(&pCh->tqueue_input, do_input); |
335 | INIT_WORK(&pCh->tqueue_status, do_status, pCh); | 335 | INIT_WORK(&pCh->tqueue_status, do_status); |
336 | 336 | ||
337 | #ifdef IP2DEBUG_TRACE | 337 | #ifdef IP2DEBUG_TRACE |
338 | pCh->trace = ip2trace; | 338 | pCh->trace = ip2trace; |
@@ -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 | //****************************************************************************** |
1009 | static int | 1009 | static int |
1010 | i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user ) | 1010 | i2Output(i2ChanStrPtr pCh, const char *pSource, int count) |
1011 | { | 1011 | { |
1012 | i2eBordStrPtr pB; | 1012 | i2eBordStrPtr pB; |
1013 | unsigned char *pInsert; | 1013 | unsigned char *pInsert; |
@@ -1016,11 +1016,10 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user ) | |||
1016 | unsigned short channel; | 1016 | unsigned short channel; |
1017 | unsigned short stuffIndex; | 1017 | unsigned short stuffIndex; |
1018 | unsigned long flags; | 1018 | unsigned long flags; |
1019 | int rc = 0; | ||
1020 | 1019 | ||
1021 | int bailout = 10; | 1020 | int bailout = 10; |
1022 | 1021 | ||
1023 | ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, user ); | 1022 | ip2trace (CHANN, ITRC_OUTPUT, ITRC_ENTER, 2, count, 0 ); |
1024 | 1023 | ||
1025 | // Ensure channel structure seems real | 1024 | // Ensure channel structure seems real |
1026 | if ( !i2Validate ( pCh ) ) | 1025 | if ( !i2Validate ( pCh ) ) |
@@ -1087,12 +1086,7 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user ) | |||
1087 | DATA_COUNT_OF(pInsert) = amountToMove; | 1086 | DATA_COUNT_OF(pInsert) = amountToMove; |
1088 | 1087 | ||
1089 | // Move the data | 1088 | // Move the data |
1090 | if ( user ) { | 1089 | 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 | 1090 | // Adjust pointers and indices |
1097 | pSource += amountToMove; | 1091 | pSource += amountToMove; |
1098 | pCh->Obuf_char_count += amountToMove; | 1092 | pCh->Obuf_char_count += amountToMove; |
@@ -1578,7 +1572,7 @@ i2StripFifo(i2eBordStrPtr pB) | |||
1578 | #ifdef USE_IQ | 1572 | #ifdef USE_IQ |
1579 | schedule_work(&pCh->tqueue_input); | 1573 | schedule_work(&pCh->tqueue_input); |
1580 | #else | 1574 | #else |
1581 | do_input(pCh); | 1575 | do_input(&pCh->tqueue_input); |
1582 | #endif | 1576 | #endif |
1583 | 1577 | ||
1584 | // Note we do not need to maintain any flow-control credits at this | 1578 | // Note we do not need to maintain any flow-control credits at this |
@@ -1815,7 +1809,7 @@ i2StripFifo(i2eBordStrPtr pB) | |||
1815 | #ifdef USE_IQ | 1809 | #ifdef USE_IQ |
1816 | schedule_work(&pCh->tqueue_status); | 1810 | schedule_work(&pCh->tqueue_status); |
1817 | #else | 1811 | #else |
1818 | do_status(pCh); | 1812 | do_status(&pCh->tqueue_status); |
1819 | #endif | 1813 | #endif |
1820 | } | 1814 | } |
1821 | } | 1815 | } |