aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
commitc7bec5aba52392aa8d675b8722735caf4a8b7265 (patch)
tree8087cfd2866e63fba25e18ba1fa0f374c27be4f0 /drivers/char/rio
parentc31f28e778ab299a5035ea2bda64f245b8915d7c (diff)
Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void* - Eliminate checks for conditions that never occur. These typically fall into two classes: 1) Checking for 'dev_id == NULL', then it is never called with NULL as an argument. 2) Checking for invalid irq number, when the only caller (the system) guarantees the irq handler is called with the proper 'irq' number argument. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/char/rio')
-rw-r--r--drivers/char/rio/func.h2
-rw-r--r--drivers/char/rio/rio_linux.c4
-rw-r--r--drivers/char/rio/riointr.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/rio/func.h b/drivers/char/rio/func.h
index 6b039186856d..9e7283bd81a0 100644
--- a/drivers/char/rio/func.h
+++ b/drivers/char/rio/func.h
@@ -88,7 +88,7 @@ void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
88 88
89/* riointr.c */ 89/* riointr.c */
90void RIOTxEnable(char *); 90void RIOTxEnable(char *);
91void RIOServiceHost(struct rio_info *, struct Host *, int); 91void RIOServiceHost(struct rio_info *, struct Host *);
92int riotproc(struct rio_info *, struct ttystatics *, int, int); 92int riotproc(struct rio_info *, struct ttystatics *, int, int);
93 93
94/* rioparam.c */ 94/* rioparam.c */
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 3bea594600d4..c382df0f82f6 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -368,7 +368,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr)
368 struct Host *HostP; 368 struct Host *HostP;
369 func_enter(); 369 func_enter();
370 370
371 HostP = (struct Host *) ptr; /* &p->RIOHosts[(long)ptr]; */ 371 HostP = ptr; /* &p->RIOHosts[(long)ptr]; */
372 rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); 372 rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec);
373 373
374 /* AAargh! The order in which to do these things is essential and 374 /* AAargh! The order in which to do these things is essential and
@@ -402,7 +402,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr)
402 return IRQ_HANDLED; 402 return IRQ_HANDLED;
403 } 403 }
404 404
405 RIOServiceHost(p, HostP, irq); 405 RIOServiceHost(p, HostP);
406 406
407 rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); 407 rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type);
408 408
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
index 0bd09040a5c0..eeda40c5e189 100644
--- a/drivers/char/rio/riointr.c
+++ b/drivers/char/rio/riointr.c
@@ -181,7 +181,7 @@ static int RupIntr;
181static int RxIntr; 181static int RxIntr;
182static int TxIntr; 182static int TxIntr;
183 183
184void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) 184void RIOServiceHost(struct rio_info *p, struct Host *HostP)
185{ 185{
186 rio_spin_lock(&HostP->HostLock); 186 rio_spin_lock(&HostP->HostLock);
187 if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { 187 if ((HostP->Flags & RUN_STATE) != RC_RUNNING) {