Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / sound / oss / mpu401.c
index 0aac54c..a690ca5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * sound/mpu401.c
+ * sound/oss/mpu401.c
  *
  * The low level driver for Roland MPU-401 compatible Midi cards.
  */
@@ -432,19 +432,10 @@ static void mpu401_input_loop(struct mpu_config *devc)
        devc->m_busy = 0;
 }
 
-int intchk_mpu401(void *dev_id)
+static irqreturn_t mpuintr(int irq, void *dev_id)
 {
        struct mpu_config *devc;
-       int dev = (int) dev_id;
-
-       devc = &dev_conf[dev];
-       return input_avail(devc);
-}
-
-irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
-{
-       struct mpu_config *devc;
-       int dev = (int) dev_id;
+       int dev = (int)(unsigned long) dev_id;
        int handled = 0;
 
        devc = &dev_conf[dev];
@@ -1012,7 +1003,8 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)
                }
                if (!devc->shared_irq)
                {
-                       if (request_irq(devc->irq, mpuintr, 0, "mpu401", (void *)m) < 0)
+                       if (request_irq(devc->irq, mpuintr, 0, "mpu401",
+                                       hw_config) < 0)
                        {
                                printk(KERN_WARNING "mpu401: Failed to allocate IRQ%d\n", devc->irq);
                                ret = -ENOMEM;
@@ -1032,7 +1024,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)
                                devc->capabilities |= MPU_CAP_INTLG;    /* Supports intelligent mode */
 
 
-       mpu401_synth_operations[m] = (struct synth_operations *)kmalloc(sizeof(struct synth_operations), GFP_KERNEL);
+       mpu401_synth_operations[m] = kmalloc(sizeof(struct synth_operations), GFP_KERNEL);
 
        if (mpu401_synth_operations[m] == NULL)
        {
@@ -1121,7 +1113,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)
        return 0;
 
 out_irq:
-       free_irq(devc->irq, (void *)m);
+       free_irq(devc->irq, hw_config);
 out_mididev:
        sound_unload_mididev(m);
 out_err:
@@ -1236,7 +1228,7 @@ void unload_mpu401(struct address_info *hw_config)
        if (n != -1) {
                release_region(hw_config->io_base, 2);
                if (hw_config->always_detect == 0 && hw_config->irq > 0)
-                       free_irq(hw_config->irq, (void *)n);
+                       free_irq(hw_config->irq, hw_config);
                p=mpu401_synth_operations[n];
                sound_unload_mididev(n);
                sound_unload_timerdev(hw_config->slots[2]);
@@ -1761,8 +1753,6 @@ static int mpu_timer_init(int midi_dev)
 EXPORT_SYMBOL(probe_mpu401);
 EXPORT_SYMBOL(attach_mpu401);
 EXPORT_SYMBOL(unload_mpu401);
-EXPORT_SYMBOL(intchk_mpu401);
-EXPORT_SYMBOL(mpuintr);
 
 static struct address_info cfg;