caiaq endianness fix
[safe/jmp/linux-2.6] / sound / drivers / portman2x4.c
index 6c48772..b1c047e 100644 (file)
@@ -37,7 +37,6 @@
  *      - ported from alsa 0.5 to 1.0
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/parport.h>
@@ -611,7 +610,7 @@ static int __devinit snd_portman_rawmidi_create(struct snd_card *card)
 /*********************************************************************
  * parport stuff
  *********************************************************************/
-static void snd_portman_interrupt(int irq, void *userdata)
+static void snd_portman_interrupt(void *userdata)
 {
        unsigned char midivalue = 0;
        struct portman *pm = ((struct snd_card*)userdata)->private_data;
@@ -668,7 +667,7 @@ static int __devinit snd_portman_probe_port(struct parport *p)
        parport_release(pardev);
        parport_unregister_device(pardev);
 
-       return res;
+       return res ? -EIO : 0;
 }
 
 static void __devinit snd_portman_attach(struct parport *p)
@@ -676,13 +675,13 @@ static void __devinit snd_portman_attach(struct parport *p)
        struct platform_device *device;
 
        device = platform_device_alloc(PLATFORM_DRIVER, device_count);
-       if (!device) 
+       if (!device)
                return;
 
        /* Temporary assignment to forward the parport */
        platform_set_drvdata(device, p);
 
-       if (platform_device_register(device) < 0) {
+       if (platform_device_add(device) < 0) {
                platform_device_put(device);
                return;
        }
@@ -797,6 +796,8 @@ static int __devinit snd_portman_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, card);
 
+       snd_card_set_dev(card, &pdev->dev);
+
        /* At this point card will be usable */
        if ((err = snd_card_register(card)) < 0) {
                snd_printd("Cannot register card\n");
@@ -811,7 +812,7 @@ __err:
        return err;
 }
 
-static int snd_portman_remove(struct platform_device *pdev)
+static int __devexit snd_portman_remove(struct platform_device *pdev)
 {
        struct snd_card *card = platform_get_drvdata(pdev);
 
@@ -824,7 +825,7 @@ static int snd_portman_remove(struct platform_device *pdev)
 
 static struct platform_driver snd_portman_driver = {
        .probe  = snd_portman_probe,
-       .remove = snd_portman_remove,
+       .remove = __devexit_p(snd_portman_remove),
        .driver = {
                .name = PLATFORM_DRIVER
        }