ALSA: hda - Fix invalid amp value for STAC925x
[safe/jmp/linux-2.6] / sound / drivers / mtpav.c
index a9ff391..5b89c08 100644 (file)
@@ -50,7 +50,6 @@
  *
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
@@ -583,7 +582,7 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id)
 /*
  * get ISA resources
  */
-static int __init snd_mtpav_get_ISA(struct mtpav * mcard)
+static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
 {
        if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
                snd_printk("MTVAP port 0x%lx is busy\n", port);
@@ -619,7 +618,7 @@ static struct snd_rawmidi_ops snd_mtpav_input = {
  * get RAWMIDI resources
  */
 
-static void __init snd_mtpav_set_name(struct mtpav *chip,
+static void __devinit snd_mtpav_set_name(struct mtpav *chip,
                                      struct snd_rawmidi_substream *substream)
 {
        if (substream->number >= 0 && substream->number < chip->num_ports)
@@ -634,7 +633,7 @@ static void __init snd_mtpav_set_name(struct mtpav *chip,
                strcpy(substream->name, "MTP broadcast");
 }
 
-static int __init snd_mtpav_get_RAWMIDI(struct mtpav *mcard)
+static int __devinit snd_mtpav_get_RAWMIDI(struct mtpav *mcard)
 {
        int rval;
        struct snd_rawmidi *rawmidi;
@@ -691,7 +690,7 @@ static void snd_mtpav_free(struct snd_card *card)
 
 /*
  */
-static int __init snd_mtpav_probe(struct platform_device *dev)
+static int __devinit snd_mtpav_probe(struct platform_device *dev)
 {
        struct snd_card *card;
        int err;
@@ -716,6 +715,10 @@ static int __init snd_mtpav_probe(struct platform_device *dev)
 
        card->private_free = snd_mtpav_free;
 
+       err = snd_mtpav_get_RAWMIDI(mtp_card);
+       if (err < 0)
+               goto __error;
+
        err = snd_mtpav_get_ISA(mtp_card);
        if (err < 0)
                goto __error;
@@ -725,10 +728,6 @@ static int __init snd_mtpav_probe(struct platform_device *dev)
        snprintf(card->longname, sizeof(card->longname),
                 "MTPAV on parallel port at 0x%lx", port);
 
-       err = snd_mtpav_get_RAWMIDI(mtp_card);
-       if (err < 0)
-               goto __error;
-
        snd_mtpav_portscan(mtp_card);
 
        snd_card_set_dev(card, &dev->dev);
@@ -745,7 +744,7 @@ static int __init snd_mtpav_probe(struct platform_device *dev)
        return err;
 }
 
-static int snd_mtpav_remove(struct platform_device *devptr)
+static int __devexit snd_mtpav_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -756,7 +755,7 @@ static int snd_mtpav_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_mtpav_driver = {
        .probe          = snd_mtpav_probe,
-       .remove         = snd_mtpav_remove,
+       .remove         = __devexit_p(snd_mtpav_remove),
        .driver         = {
                .name   = SND_MTPAV_DRIVER
        },