Commit 693783817a79d8619335e2bf1a33de73cf189864
Committed by
Linus Torvalds
1 parent
c3ed85a36f
Exists in
master
and in
7 other branches
mpu401 warning fixes
Fix these: sound/oss/mpu401.c: In function 'attach_mpu401': sound/oss/mpu401.c:1006: warning: cast to pointer from integer of different size sound/oss/mpu401.c:1115: warning: cast to pointer from integer of different size sound/oss/mpu401.c: In function 'unload_mpu401': sound/oss/mpu401.c:1230: warning: cast to pointer from integer of different size by making it implement the request_irq()/free_irq() cookies correctly. Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff
sound/oss/mpu401.c
... | ... | @@ -1003,7 +1003,8 @@ |
1003 | 1003 | } |
1004 | 1004 | if (!devc->shared_irq) |
1005 | 1005 | { |
1006 | - if (request_irq(devc->irq, mpuintr, 0, "mpu401", (void *)m) < 0) | |
1006 | + if (request_irq(devc->irq, mpuintr, 0, "mpu401", | |
1007 | + hw_config) < 0) | |
1007 | 1008 | { |
1008 | 1009 | printk(KERN_WARNING "mpu401: Failed to allocate IRQ%d\n", devc->irq); |
1009 | 1010 | ret = -ENOMEM; |
... | ... | @@ -1112,7 +1113,7 @@ |
1112 | 1113 | return 0; |
1113 | 1114 | |
1114 | 1115 | out_irq: |
1115 | - free_irq(devc->irq, (void *)m); | |
1116 | + free_irq(devc->irq, hw_config); | |
1116 | 1117 | out_mididev: |
1117 | 1118 | sound_unload_mididev(m); |
1118 | 1119 | out_err: |
... | ... | @@ -1227,7 +1228,7 @@ |
1227 | 1228 | if (n != -1) { |
1228 | 1229 | release_region(hw_config->io_base, 2); |
1229 | 1230 | if (hw_config->always_detect == 0 && hw_config->irq > 0) |
1230 | - free_irq(hw_config->irq, (void *)n); | |
1231 | + free_irq(hw_config->irq, hw_config); | |
1231 | 1232 | p=mpu401_synth_operations[n]; |
1232 | 1233 | sound_unload_mididev(n); |
1233 | 1234 | sound_unload_timerdev(hw_config->slots[2]); |