aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ip2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ip2')
-rw-r--r--drivers/char/ip2/i2ellis.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/char/ip2/i2ellis.c b/drivers/char/ip2/i2ellis.c
index dd761a1e4f08..61ef013b8445 100644
--- a/drivers/char/ip2/i2ellis.c
+++ b/drivers/char/ip2/i2ellis.c
@@ -43,8 +43,6 @@ static void iiEnableMailIrqIIEX(i2eBordStrPtr);
43static void iiWriteMaskII(i2eBordStrPtr, unsigned char); 43static void iiWriteMaskII(i2eBordStrPtr, unsigned char);
44static void iiWriteMaskIIEX(i2eBordStrPtr, unsigned char); 44static void iiWriteMaskIIEX(i2eBordStrPtr, unsigned char);
45 45
46static void ii2DelayTimer(unsigned int);
47static void ii2DelayWakeup(unsigned long id);
48static void ii2Nop(void); 46static void ii2Nop(void);
49 47
50//*************** 48//***************
@@ -55,8 +53,6 @@ static int ii2Safe; // Safe I/O address for delay routine
55 53
56static int iiDelayed; // Set when the iiResetDelay function is 54static int iiDelayed; // Set when the iiResetDelay function is
57 // called. Cleared when ANY board is reset. 55 // called. Cleared when ANY board is reset.
58static struct timer_list * pDelayTimer; // Used by iiDelayTimer
59static wait_queue_head_t pDelayWait; // Used by iiDelayTimer
60static rwlock_t Dl_spinlock; 56static rwlock_t Dl_spinlock;
61 57
62//******** 58//********
@@ -86,9 +82,6 @@ static rwlock_t Dl_spinlock;
86static void 82static void
87iiEllisInit(void) 83iiEllisInit(void)
88{ 84{
89 pDelayTimer = kmalloc ( sizeof (struct timer_list), GFP_KERNEL );
90 init_timer(pDelayTimer);
91 init_waitqueue_head(&pDelayWait);
92 LOCK_INIT(&Dl_spinlock); 85 LOCK_INIT(&Dl_spinlock);
93} 86}
94 87
@@ -106,7 +99,6 @@ iiEllisInit(void)
106static void 99static void
107iiEllisCleanup(void) 100iiEllisCleanup(void)
108{ 101{
109 kfree(pDelayTimer);
110} 102}
111 103
112//****************************************************************************** 104//******************************************************************************
@@ -560,19 +552,6 @@ iiInitialize(i2eBordStrPtr pB)
560 COMPLETE(pB, I2EE_GOOD); 552 COMPLETE(pB, I2EE_GOOD);
561} 553}
562 554
563//=======================================================
564// Delay Routines
565//
566// iiDelayIO
567// iiNop
568//=======================================================
569
570static void
571ii2DelayWakeup(unsigned long id)
572{
573 wake_up_interruptible ( &pDelayWait );
574}
575
576//****************************************************************************** 555//******************************************************************************
577// Function: ii2DelayTimer(mseconds) 556// Function: ii2DelayTimer(mseconds)
578// Parameters: mseconds - number of milliseconds to delay 557// Parameters: mseconds - number of milliseconds to delay
@@ -594,28 +573,7 @@ ii2DelayWakeup(unsigned long id)
594static void 573static void
595ii2DelayTimer(unsigned int mseconds) 574ii2DelayTimer(unsigned int mseconds)
596{ 575{
597 wait_queue_t wait; 576 msleep_interruptible(mseconds);
598
599 init_waitqueue_entry(&wait, current);
600
601 init_timer ( pDelayTimer );
602
603 add_wait_queue(&pDelayWait, &wait);
604
605 set_current_state( TASK_INTERRUPTIBLE );
606
607 pDelayTimer->expires = jiffies + ( mseconds + 9 ) / 10;
608 pDelayTimer->function = ii2DelayWakeup;
609 pDelayTimer->data = 0;
610
611 add_timer ( pDelayTimer );
612
613 schedule();
614
615 set_current_state( TASK_RUNNING );
616 remove_wait_queue(&pDelayWait, &wait);
617
618 del_timer ( pDelayTimer );
619} 577}
620 578
621#if 0 579#if 0