diff options
Diffstat (limited to 'drivers/char/ip2')
-rw-r--r-- | drivers/char/ip2/i2lib.c | 11 | ||||
-rw-r--r-- | drivers/char/ip2/i2lib.h | 2 | ||||
-rw-r--r-- | drivers/char/ip2/ip2main.c | 13 |
3 files changed, 10 insertions, 16 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 | //****************************************************************************** |
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; |
@@ -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; |
diff --git a/drivers/char/ip2/i2lib.h b/drivers/char/ip2/i2lib.h index 952e113ccd8a..e559e9bac06d 100644 --- a/drivers/char/ip2/i2lib.h +++ b/drivers/char/ip2/i2lib.h | |||
@@ -332,7 +332,7 @@ static int i2QueueCommands(int, i2ChanStrPtr, int, int, cmdSyntaxPtr,...); | |||
332 | static int i2GetStatus(i2ChanStrPtr, int); | 332 | static int i2GetStatus(i2ChanStrPtr, int); |
333 | static int i2Input(i2ChanStrPtr); | 333 | static int i2Input(i2ChanStrPtr); |
334 | static int i2InputFlush(i2ChanStrPtr); | 334 | static int i2InputFlush(i2ChanStrPtr); |
335 | static int i2Output(i2ChanStrPtr, const char *, int, int); | 335 | static int i2Output(i2ChanStrPtr, const char *, int); |
336 | static int i2OutputFree(i2ChanStrPtr); | 336 | static int i2OutputFree(i2ChanStrPtr); |
337 | static int i2ServiceBoard(i2eBordStrPtr); | 337 | static int i2ServiceBoard(i2eBordStrPtr); |
338 | static void i2DrainOutput(i2ChanStrPtr, int); | 338 | static void i2DrainOutput(i2ChanStrPtr, int); |
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 62ef511d143b..a3f32d46d2f8 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -190,7 +190,7 @@ static int ip2_tiocmset(struct tty_struct *tty, struct file *file, | |||
190 | 190 | ||
191 | static void set_irq(int, int); | 191 | static void set_irq(int, int); |
192 | static void ip2_interrupt_bh(i2eBordStrPtr pB); | 192 | static void ip2_interrupt_bh(i2eBordStrPtr pB); |
193 | static irqreturn_t ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs); | 193 | static irqreturn_t ip2_interrupt(int irq, void *dev_id); |
194 | static void ip2_poll(unsigned long arg); | 194 | static void ip2_poll(unsigned long arg); |
195 | static inline void service_all_boards(void); | 195 | static inline void service_all_boards(void); |
196 | static void do_input(void *p); | 196 | static void do_input(void *p); |
@@ -1154,10 +1154,9 @@ ip2_interrupt_bh(i2eBordStrPtr pB) | |||
1154 | 1154 | ||
1155 | 1155 | ||
1156 | /******************************************************************************/ | 1156 | /******************************************************************************/ |
1157 | /* Function: ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) */ | 1157 | /* Function: ip2_interrupt(int irq, void *dev_id) */ |
1158 | /* Parameters: irq - interrupt number */ | 1158 | /* Parameters: irq - interrupt number */ |
1159 | /* pointer to optional device ID structure */ | 1159 | /* pointer to optional device ID structure */ |
1160 | /* pointer to register structure */ | ||
1161 | /* Returns: Nothing */ | 1160 | /* Returns: Nothing */ |
1162 | /* */ | 1161 | /* */ |
1163 | /* Description: */ | 1162 | /* Description: */ |
@@ -1173,7 +1172,7 @@ ip2_interrupt_bh(i2eBordStrPtr pB) | |||
1173 | /* */ | 1172 | /* */ |
1174 | /******************************************************************************/ | 1173 | /******************************************************************************/ |
1175 | static irqreturn_t | 1174 | static irqreturn_t |
1176 | ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs) | 1175 | ip2_interrupt(int irq, void *dev_id) |
1177 | { | 1176 | { |
1178 | int i; | 1177 | int i; |
1179 | i2eBordStrPtr pB; | 1178 | i2eBordStrPtr pB; |
@@ -1237,7 +1236,7 @@ ip2_poll(unsigned long arg) | |||
1237 | // Just polled boards, IRQ = 0 will hit all non-interrupt boards. | 1236 | // Just polled boards, IRQ = 0 will hit all non-interrupt boards. |
1238 | // It will NOT poll boards handled by hard interrupts. | 1237 | // It will NOT poll boards handled by hard interrupts. |
1239 | // The issue of queued BH interrups is handled in ip2_interrupt(). | 1238 | // The issue of queued BH interrups is handled in ip2_interrupt(). |
1240 | ip2_interrupt(0, NULL, NULL); | 1239 | ip2_interrupt(0, NULL); |
1241 | 1240 | ||
1242 | PollTimer.expires = POLL_TIMEOUT; | 1241 | PollTimer.expires = POLL_TIMEOUT; |
1243 | add_timer( &PollTimer ); | 1242 | add_timer( &PollTimer ); |
@@ -1705,7 +1704,7 @@ ip2_write( PTTY tty, const unsigned char *pData, int count) | |||
1705 | 1704 | ||
1706 | /* This is the actual move bit. Make sure it does what we need!!!!! */ | 1705 | /* This is the actual move bit. Make sure it does what we need!!!!! */ |
1707 | WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags); | 1706 | WRITE_LOCK_IRQSAVE(&pCh->Pbuf_spinlock,flags); |
1708 | bytesSent = i2Output( pCh, pData, count, 0 ); | 1707 | bytesSent = i2Output( pCh, pData, count); |
1709 | WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags); | 1708 | WRITE_UNLOCK_IRQRESTORE(&pCh->Pbuf_spinlock,flags); |
1710 | 1709 | ||
1711 | ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent ); | 1710 | ip2trace (CHANN, ITRC_WRITE, ITRC_RETURN, 1, bytesSent ); |
@@ -1765,7 +1764,7 @@ ip2_flush_chars( PTTY tty ) | |||
1765 | // | 1764 | // |
1766 | // We may need to restart i2Output if it does not fullfill this request | 1765 | // We may need to restart i2Output if it does not fullfill this request |
1767 | // | 1766 | // |
1768 | strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff, 0 ); | 1767 | strip = i2Output( pCh, pCh->Pbuf, pCh->Pbuf_stuff); |
1769 | if ( strip != pCh->Pbuf_stuff ) { | 1768 | if ( strip != pCh->Pbuf_stuff ) { |
1770 | memmove( pCh->Pbuf, &pCh->Pbuf[strip], pCh->Pbuf_stuff - strip ); | 1769 | memmove( pCh->Pbuf, &pCh->Pbuf[strip], pCh->Pbuf_stuff - strip ); |
1771 | } | 1770 | } |