Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113423
b: refs/heads/master
c: 9d020a2
h: refs/heads/master
i:
  113421: 2af3524
  113419: c56d19b
  113415: 96a4c98
  113407: 305f80c
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Oct 13, 2008
1 parent 09c7cd8 commit acf7480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1ddfd950221cca4d7ba753a71bc4b8930a42a43
refs/heads/master: 9d020a2e5fd2c79f5b08a6cab2b02e7231d7cb84
19 changes: 4 additions & 15 deletions trunk/drivers/char/ip2/ip2main.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ static unsigned long bh_counter;
*/
#define POLL_TIMEOUT (jiffies + 1)
static DEFINE_TIMER(PollTimer, ip2_poll, 0, 0);
static char TimerOn;

#ifdef IP2DEBUG_TRACE
/* Trace (debug) buffer data */
Expand Down Expand Up @@ -374,11 +373,7 @@ static void __exit ip2_cleanup_module(void)
int err;
int i;

/* Stop poll timer if we had one. */
if (TimerOn) {
del_timer(&PollTimer);
TimerOn = 0;
}
del_timer_sync(&PollTimer);

/* Reset the boards we have. */
for (i = 0; i < IP2_MAX_BOARDS; i++)
Expand Down Expand Up @@ -774,10 +769,8 @@ static int __init ip2_loadmain(void)
}
if (ip2config.irq[i] == CIR_POLL) {
retry:
if (!TimerOn) {
PollTimer.expires = POLL_TIMEOUT;
add_timer(&PollTimer);
TimerOn = 1;
if (!timer_pending(&PollTimer)) {
mod_timer(&PollTimer, POLL_TIMEOUT);
printk(KERN_INFO "IP2: polling\n");
}
} else {
Expand Down Expand Up @@ -1283,16 +1276,12 @@ ip2_poll(unsigned long arg)
{
ip2trace (ITRC_NO_PORT, ITRC_INTR, 100, 0 );

TimerOn = 0; // it's the truth but not checked in service

// Just polled boards, IRQ = 0 will hit all non-interrupt boards.
// It will NOT poll boards handled by hard interrupts.
// The issue of queued BH interrupts is handled in ip2_interrupt().
ip2_polled_interrupt();

PollTimer.expires = POLL_TIMEOUT;
add_timer( &PollTimer );
TimerOn = 1;
mod_timer(&PollTimer, POLL_TIMEOUT);

ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
}
Expand Down

0 comments on commit acf7480

Please sign in to comment.