aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
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 /sound/oss
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 'sound/oss')
-rw-r--r--sound/oss/es1371.c2
-rw-r--r--sound/oss/hal2.c2
-rw-r--r--sound/oss/i810_audio.c2
-rw-r--r--sound/oss/mpu401.c2
-rw-r--r--sound/oss/vwsnd.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c
index 2562f4769b90..ddf6b0a0bca5 100644
--- a/sound/oss/es1371.c
+++ b/sound/oss/es1371.c
@@ -1102,7 +1102,7 @@ static void es1371_handle_midi(struct es1371_state *s)
1102 1102
1103static irqreturn_t es1371_interrupt(int irq, void *dev_id) 1103static irqreturn_t es1371_interrupt(int irq, void *dev_id)
1104{ 1104{
1105 struct es1371_state *s = (struct es1371_state *)dev_id; 1105 struct es1371_state *s = dev_id;
1106 unsigned int intsrc, sctl; 1106 unsigned int intsrc, sctl;
1107 1107
1108 /* fastpath out, to ease interrupt sharing */ 1108 /* fastpath out, to ease interrupt sharing */
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c
index 7807abac0625..784bdd707055 100644
--- a/sound/oss/hal2.c
+++ b/sound/oss/hal2.c
@@ -372,7 +372,7 @@ static void hal2_adc_interrupt(struct hal2_codec *adc)
372 372
373static irqreturn_t hal2_interrupt(int irq, void *dev_id) 373static irqreturn_t hal2_interrupt(int irq, void *dev_id)
374{ 374{
375 struct hal2_card *hal2 = (struct hal2_card*)dev_id; 375 struct hal2_card *hal2 = dev_id;
376 irqreturn_t ret = IRQ_NONE; 376 irqreturn_t ret = IRQ_NONE;
377 377
378 /* decide what caused this interrupt */ 378 /* decide what caused this interrupt */
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
index a48af879b466..240cc7939b69 100644
--- a/sound/oss/i810_audio.c
+++ b/sound/oss/i810_audio.c
@@ -1525,7 +1525,7 @@ static void i810_channel_interrupt(struct i810_card *card)
1525 1525
1526static irqreturn_t i810_interrupt(int irq, void *dev_id) 1526static irqreturn_t i810_interrupt(int irq, void *dev_id)
1527{ 1527{
1528 struct i810_card *card = (struct i810_card *)dev_id; 1528 struct i810_card *card = dev_id;
1529 u32 status; 1529 u32 status;
1530 1530
1531 spin_lock(&card->lock); 1531 spin_lock(&card->lock);
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c
index 58d4a5d05a27..e96220541971 100644
--- a/sound/oss/mpu401.c
+++ b/sound/oss/mpu401.c
@@ -435,7 +435,7 @@ static void mpu401_input_loop(struct mpu_config *devc)
435static irqreturn_t mpuintr(int irq, void *dev_id) 435static irqreturn_t mpuintr(int irq, void *dev_id)
436{ 436{
437 struct mpu_config *devc; 437 struct mpu_config *devc;
438 int dev = (int) dev_id; 438 int dev = (int)(unsigned long) dev_id;
439 int handled = 0; 439 int handled = 0;
440 440
441 devc = &dev_conf[dev]; 441 devc = &dev_conf[dev];
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
index 0cd4d6ec9862..6dfb9f4b03ec 100644
--- a/sound/oss/vwsnd.c
+++ b/sound/oss/vwsnd.c
@@ -2235,7 +2235,7 @@ static void vwsnd_audio_write_intr(vwsnd_dev_t *devc, unsigned int status)
2235 2235
2236static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id) 2236static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id)
2237{ 2237{
2238 vwsnd_dev_t *devc = (vwsnd_dev_t *) dev_id; 2238 vwsnd_dev_t *devc = dev_id;
2239 unsigned int status; 2239 unsigned int status;
2240 2240
2241 DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id); 2241 DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id);