aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-10-13 05:34:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:39 -0400
commit7ccd7020ef188b62781fe2f0a68131aa066d59a5 (patch)
tree26bff62cfbc6257aa6aadede5255d594c16e63ee
parentcf176bc30289f1e3ed858bc7630766cbd7d68a86 (diff)
ip2: fix sparse warnings
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/ip2/ip2main.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 1d462849964..098c9de3022 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -375,9 +375,7 @@ have_requested_irq( char irq )
375/* handle subsequent installations of the driver. All memory allocated by the */ 375/* handle subsequent installations of the driver. All memory allocated by the */
376/* driver should be returned since it may be unloaded from memory. */ 376/* driver should be returned since it may be unloaded from memory. */
377/******************************************************************************/ 377/******************************************************************************/
378#ifdef MODULE 378static void __exit ip2_cleanup_module(void)
379void __exit
380ip2_cleanup_module(void)
381{ 379{
382 int err; 380 int err;
383 int i; 381 int i;
@@ -431,7 +429,8 @@ ip2_cleanup_module(void)
431 ip2config.pci_dev[i] = NULL; 429 ip2config.pci_dev[i] = NULL;
432 } 430 }
433#endif 431#endif
434 if ((pB = i2BoardPtrTable[i]) != 0 ) { 432 pB = i2BoardPtrTable[i];
433 if (pB != NULL) {
435 kfree ( pB ); 434 kfree ( pB );
436 i2BoardPtrTable[i] = NULL; 435 i2BoardPtrTable[i] = NULL;
437 } 436 }
@@ -448,7 +447,6 @@ ip2_cleanup_module(void)
448#endif 447#endif
449} 448}
450module_exit(ip2_cleanup_module); 449module_exit(ip2_cleanup_module);
451#endif /* MODULE */
452 450
453static const struct tty_operations ip2_ops = { 451static const struct tty_operations ip2_ops = {
454 .open = ip2_open, 452 .open = ip2_open,
@@ -1255,9 +1253,8 @@ ip2_polled_interrupt(void)
1255{ 1253{
1256 int i; 1254 int i;
1257 i2eBordStrPtr pB; 1255 i2eBordStrPtr pB;
1258 const int irq = 0;
1259 1256
1260 ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq ); 1257 ip2trace(ITRC_NO_PORT, ITRC_INTR, 99, 1, 0);
1261 1258
1262 /* Service just the boards on the list using this irq */ 1259 /* Service just the boards on the list using this irq */
1263 for( i = 0; i < i2nBoards; ++i ) { 1260 for( i = 0; i < i2nBoards; ++i ) {
@@ -1266,9 +1263,8 @@ ip2_polled_interrupt(void)
1266// Only process those boards which match our IRQ. 1263// Only process those boards which match our IRQ.
1267// IRQ = 0 for polled boards, we won't poll "IRQ" boards 1264// IRQ = 0 for polled boards, we won't poll "IRQ" boards
1268 1265
1269 if ( pB && (pB->i2eUsingIrq == irq) ) { 1266 if (pB && pB->i2eUsingIrq == 0)
1270 ip2_irq_work(pB); 1267 ip2_irq_work(pB);
1271 }
1272 } 1268 }
1273 1269
1274 ++irq_counter; 1270 ++irq_counter;