[ALSA] Fix __devinit and __devexit issues with sound drivers
authorPrarit Bhargava <prarit@redhat.com>
Tue, 13 Feb 2007 12:11:11 +0000 (13:11 +0100)
committerJaroslav Kysela <perex@suse.cz>
Wed, 14 Feb 2007 07:38:28 +0000 (08:38 +0100)
Fix __devinit and __devexit issues with sound drivers.
Resolves MODPOST warnings similar to:
WARNING: sound/drivers/snd-dummy.o - Section mismatch: reference to .init.text:snd_dummy_probe from .data.rel.local between 'snd_dummy_driver' (at offset 0x0) and 'snd_dummy_controls'
WARNING: sound/drivers/snd-mtpav.o - Section mismatch: reference to .init.text:snd_mtpav_probe from .data.rel.local between 'snd_mtpav_driver' (at offset 0x0) and 'snd_mtpav_input'
WARNING: sound/drivers/snd-virmidi.o - Section mismatch: reference to .init.text:snd_virmidi_probe from .data.rel.local after 'snd_virmidi_driver' (at offset 0x0)

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
15 files changed:
sound/arm/pxa2xx-ac97.c
sound/drivers/dummy.c
sound/drivers/mtpav.c
sound/drivers/mts64.c
sound/drivers/portman2x4.c
sound/drivers/serial-u16550.c
sound/drivers/virmidi.c
sound/isa/ad1848/ad1848.c
sound/isa/cmi8330.c
sound/isa/es1688/es1688.c
sound/isa/gus/gusclassic.c
sound/isa/gus/gusextreme.c
sound/isa/gus/gusmax.c
sound/isa/opl3sa2.c
sound/isa/sb/sb8.c

index dede954b2c657e0c1db1f135c38da9f630e5442b..28db4be7a16f28b79d582689c8fb1388927310b3 100644 (file)
@@ -305,7 +305,7 @@ static int pxa2xx_ac97_resume(struct platform_device *dev)
 #define pxa2xx_ac97_resume     NULL
 #endif
 
-static int pxa2xx_ac97_probe(struct platform_device *dev)
+static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
 {
        struct snd_card *card;
        struct snd_ac97_bus *ac97_bus;
@@ -369,7 +369,7 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
        return ret;
 }
 
-static int pxa2xx_ac97_remove(struct platform_device *dev)
+static int __devexit pxa2xx_ac97_remove(struct platform_device *dev)
 {
        struct snd_card *card = platform_get_drvdata(dev);
 
@@ -386,7 +386,7 @@ static int pxa2xx_ac97_remove(struct platform_device *dev)
 
 static struct platform_driver pxa2xx_ac97_driver = {
        .probe          = pxa2xx_ac97_probe,
-       .remove         = pxa2xx_ac97_remove,
+       .remove         = __devexit_p(pxa2xx_ac97_remove),
        .suspend        = pxa2xx_ac97_suspend,
        .resume         = pxa2xx_ac97_resume,
        .driver         = {
index 8339bad969bab9fc4decf1a14a0b37d337952296..a0f28f51fc7eb89c0b7ea30da694a224390df8b8 100644 (file)
@@ -423,7 +423,8 @@ static struct snd_pcm_ops snd_card_dummy_capture_ops = {
        .pointer =              snd_card_dummy_pcm_pointer,
 };
 
-static int __init snd_card_dummy_pcm(struct snd_dummy *dummy, int device, int substreams)
+static int __devinit snd_card_dummy_pcm(struct snd_dummy *dummy, int device,
+                                       int substreams)
 {
        struct snd_pcm *pcm;
        int err;
@@ -562,7 +563,7 @@ DUMMY_VOLUME("CD Volume", 0, MIXER_ADDR_CD),
 DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD)
 };
 
-static int __init snd_card_dummy_new_mixer(struct snd_dummy *dummy)
+static int __devinit snd_card_dummy_new_mixer(struct snd_dummy *dummy)
 {
        struct snd_card *card = dummy->card;
        unsigned int idx;
@@ -579,7 +580,7 @@ static int __init snd_card_dummy_new_mixer(struct snd_dummy *dummy)
        return 0;
 }
 
-static int __init snd_dummy_probe(struct platform_device *devptr)
+static int __devinit snd_dummy_probe(struct platform_device *devptr)
 {
        struct snd_card *card;
        struct snd_dummy *dummy;
@@ -617,7 +618,7 @@ static int __init snd_dummy_probe(struct platform_device *devptr)
        return err;
 }
 
-static int snd_dummy_remove(struct platform_device *devptr)
+static int __devexit snd_dummy_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -648,7 +649,7 @@ static int snd_dummy_resume(struct platform_device *pdev)
 
 static struct platform_driver snd_dummy_driver = {
        .probe          = snd_dummy_probe,
-       .remove         = snd_dummy_remove,
+       .remove         = __devexit_p(snd_dummy_remove),
 #ifdef CONFIG_PM
        .suspend        = snd_dummy_suspend,
        .resume         = snd_dummy_resume,
index a9ff391258e707c3ac7bf696e457e61de0fe0d92..40eb026c86ed4d817349ae614573493646578662 100644 (file)
@@ -583,7 +583,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 +619,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 +634,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 +691,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;
@@ -745,7 +745,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 +756,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
        },
index 5327c6f841f40aad39888b5005137c78d2dcbe9e..6c9f4c9bfeb6c3616063daf1b8fe127a65360f17 100644 (file)
@@ -1026,7 +1026,7 @@ __err:
        return err;
 }
 
-static int snd_mts64_remove(struct platform_device *pdev)
+static int __devexit snd_mts64_remove(struct platform_device *pdev)
 {
        struct snd_card *card = platform_get_drvdata(pdev);
 
@@ -1039,7 +1039,7 @@ static int snd_mts64_remove(struct platform_device *pdev)
 
 static struct platform_driver snd_mts64_driver = {
        .probe  = snd_mts64_probe,
-       .remove = snd_mts64_remove,
+       .remove = __devexit_p(snd_mts64_remove),
        .driver = {
                .name = PLATFORM_DRIVER
        }
@@ -1048,7 +1048,7 @@ static struct platform_driver snd_mts64_driver = {
 /*********************************************************************
  * module init stuff
  *********************************************************************/
-static void snd_mts64_unregister_all(void)
+static void __init_or_module snd_mts64_unregister_all(void)
 {
        int i;
 
index 6c48772aaefd851d837618e449a85dee16ab9857..b43d4c96ed198ec2d3e028bd087f5ac97530b6e6 100644 (file)
@@ -811,7 +811,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 +824,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 = __dev_exit_p(snd_portman_remove),
        .driver = {
                .name = PLATFORM_DRIVER
        }
@@ -833,7 +833,7 @@ static struct platform_driver snd_portman_driver = {
 /*********************************************************************
  * module init stuff
  *********************************************************************/
-static void snd_portman_unregister_all(void)
+static void __init_or_module snd_portman_unregister_all(void)
 {
        int i;
 
index 3a86a58207269c3169c6e6457a0700d2138b0728..838a4277929d8060bc0fdda7389e0273cfc4bea7 100644 (file)
@@ -327,7 +327,7 @@ static void snd_uart16550_buffer_timer(unsigned long data)
  *  return 0 if found
  *  return negative error if not found
  */
-static int __init snd_uart16550_detect(struct snd_uart16550 *uart)
+static int __devinit snd_uart16550_detect(struct snd_uart16550 *uart)
 {
        unsigned long io_base = uart->base;
        int ok;
@@ -781,7 +781,7 @@ static int snd_uart16550_dev_free(struct snd_device *device)
        return snd_uart16550_free(uart);
 }
 
-static int __init snd_uart16550_create(struct snd_card *card,
+static int __devinit snd_uart16550_create(struct snd_card *card,
                                       unsigned long iobase,
                                       int irq,
                                       unsigned int speed,
@@ -860,7 +860,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
        return 0;
 }
 
-static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
+static void __devinit snd_uart16550_substreams(struct snd_rawmidi_str *stream)
 {
        struct snd_rawmidi_substream *substream;
 
@@ -869,7 +869,7 @@ static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
        }
 }
 
-static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
+static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
                                      int outs, int ins,
                                      struct snd_rawmidi **rmidi)
 {
@@ -896,7 +896,7 @@ static int __init snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,
        return 0;
 }
 
-static int __init snd_serial_probe(struct platform_device *devptr)
+static int __devinit snd_serial_probe(struct platform_device *devptr)
 {
        struct snd_card *card;
        struct snd_uart16550 *uart;
@@ -981,7 +981,7 @@ static int __init snd_serial_probe(struct platform_device *devptr)
        return err;
 }
 
-static int snd_serial_remove(struct platform_device *devptr)
+static int __devexit snd_serial_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -992,7 +992,7 @@ static int snd_serial_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_serial_driver = {
        .probe          = snd_serial_probe,
-       .remove         = snd_serial_remove,
+       .remove         = __devexit_p( snd_serial_remove),
        .driver         = {
                .name   = SND_SERIAL_DRIVER
        },
index 59171f8200dfb8fd1dd957e5bb37dd273d292b79..70e70baa3bc8f0e801ce9addabf1c40c83a137ea 100644 (file)
@@ -85,7 +85,7 @@ struct snd_card_virmidi {
 static struct platform_device *devices[SNDRV_CARDS];
 
 
-static int __init snd_virmidi_probe(struct platform_device *devptr)
+static int __devinit snd_virmidi_probe(struct platform_device *devptr)
 {
        struct snd_card *card;
        struct snd_card_virmidi *vmidi;
@@ -129,7 +129,7 @@ static int __init snd_virmidi_probe(struct platform_device *devptr)
        return err;
 }
 
-static int snd_virmidi_remove(struct platform_device *devptr)
+static int __devexit snd_virmidi_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -140,7 +140,7 @@ static int snd_virmidi_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_virmidi_driver = {
        .probe          = snd_virmidi_probe,
-       .remove         = snd_virmidi_remove,
+       .remove         = __devexit_p(snd_virmidi_remove),
        .driver         = {
                .name   = SND_VIRMIDI_DRIVER
        },
index 99908e44124da32593b6fa85ea87eafeb4cc1c6b..74e501dea8b1f935141f38a0b77cea08d7a8f125 100644 (file)
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 3
 static struct platform_device *devices[SNDRV_CARDS];
 
 
-static int __init snd_ad1848_probe(struct platform_device *pdev)
+static int __devinit snd_ad1848_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        struct snd_card *card;
index d1f6dfcec46edfd73e55fce385be78e618b76189..c09a8009d2fa7230196a27fab89231dcfcc4fb7b 100644 (file)
@@ -574,7 +574,7 @@ static int __devinit snd_cmi8330_nonpnp_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int snd_cmi8330_nonpnp_remove(struct platform_device *devptr)
+static int __devexit snd_cmi8330_nonpnp_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -597,7 +597,7 @@ static int snd_cmi8330_nonpnp_resume(struct platform_device *dev)
 
 static struct platform_driver snd_cmi8330_driver = {
        .probe          = snd_cmi8330_nonpnp_probe,
-       .remove         = snd_cmi8330_nonpnp_remove,
+       .remove         = __devexit_p(snd_cmi8330_nonpnp_remove),
 #ifdef CONFIG_PM
        .suspend        = snd_cmi8330_nonpnp_suspend,
        .resume         = snd_cmi8330_nonpnp_resume,
index 7f29f56e405b29a26e0c62d43182e804f0555451..65f97ff4eef1e747d7ba5bb0a1d6f875415cad13 100644 (file)
@@ -73,7 +73,7 @@ static struct platform_device *devices[SNDRV_CARDS];
 
 #define PFX    "es1688: "
 
-static int __init snd_es1688_probe(struct platform_device *pdev)
+static int __devinit snd_es1688_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        static int possible_irqs[] = {5, 9, 10, 7, -1};
@@ -171,7 +171,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev)
        return err;
 }
 
-static int snd_es1688_remove(struct platform_device *devptr)
+static int __devexit snd_es1688_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -182,7 +182,7 @@ static int snd_es1688_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_es1688_driver = {
        .probe          = snd_es1688_probe,
-       .remove         = snd_es1688_remove,
+       .remove         = __devexit_p(snd_es1688_remove),
        /* FIXME: suspend/resume */
        .driver         = {
                .name   = ES1688_DRIVER
index 37057a37dc30a870b611473113cd6b39425fa845..0395e2e0dd038290f6bb16dff43944b0acd40cf3 100644 (file)
@@ -76,7 +76,7 @@ static struct platform_device *devices[SNDRV_CARDS];
 
 #define PFX    "gusclassic: "
 
-static int __init snd_gusclassic_detect(struct snd_gus_card * gus)
+static int __devinit snd_gusclassic_detect(struct snd_gus_card * gus)
 {
        unsigned char d;
 
@@ -95,7 +95,7 @@ static int __init snd_gusclassic_detect(struct snd_gus_card * gus)
        return 0;
 }
 
-static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus)
+static void __devinit snd_gusclassic_init(int dev, struct snd_gus_card * gus)
 {
        gus->equal_irq = 0;
        gus->codec_flag = 0;
@@ -103,7 +103,7 @@ static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus)
        gus->joystick_dac = joystick_dac[dev];
 }
 
-static int __init snd_gusclassic_probe(struct platform_device *pdev)
+static int __devinit snd_gusclassic_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
@@ -211,7 +211,7 @@ static int __init snd_gusclassic_probe(struct platform_device *pdev)
        return err;
 }
 
-static int snd_gusclassic_remove(struct platform_device *devptr)
+static int __devexit snd_gusclassic_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -222,7 +222,7 @@ static int snd_gusclassic_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_gusclassic_driver = {
        .probe          = snd_gusclassic_probe,
-       .remove         = snd_gusclassic_remove,
+       .remove         = __devexit_p(snd_gusclassic_remove),
        /* FIXME: suspend/resume */
        .driver         = {
                .name   = GUSCLASSIC_DRIVER
index 532c56e35ca496fd7a28c3252ce2823b840452e5..4f55fc3e66c14cc1dd167fe1b60c19693fab6170 100644 (file)
@@ -92,7 +92,7 @@ static struct platform_device *devices[SNDRV_CARDS];
 
 #define PFX    "gusextreme: "
 
-static int __init snd_gusextreme_detect(int dev,
+static int __devinit snd_gusextreme_detect(int dev,
                                        struct snd_card *card,
                                        struct snd_gus_card * gus,
                                        struct snd_es1688 *es1688)
@@ -142,12 +142,12 @@ static int __init snd_gusextreme_detect(int dev,
        return 0;
 }
 
-static void __init snd_gusextreme_init(int dev, struct snd_gus_card * gus)
+static void __devinit snd_gusextreme_init(int dev, struct snd_gus_card * gus)
 {
        gus->joystick_dac = joystick_dac[dev];
 }
 
-static int __init snd_gusextreme_mixer(struct snd_es1688 *chip)
+static int __devinit snd_gusextreme_mixer(struct snd_es1688 *chip)
 {
        struct snd_card *card = chip->card;
        struct snd_ctl_elem_id id1, id2;
@@ -169,7 +169,7 @@ static int __init snd_gusextreme_mixer(struct snd_es1688 *chip)
        return 0;
 }
 
-static int __init snd_gusextreme_probe(struct platform_device *pdev)
+static int __devinit snd_gusextreme_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        static int possible_ess_irqs[] = {5, 9, 10, 7, -1};
@@ -321,7 +321,7 @@ static int __init snd_gusextreme_probe(struct platform_device *pdev)
        return err;
 }
 
-static int snd_gusextreme_remove(struct platform_device *devptr)
+static int __devexit snd_gusextreme_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -332,7 +332,7 @@ static int snd_gusextreme_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_gusextreme_driver = {
        .probe          = snd_gusextreme_probe,
-       .remove         = snd_gusextreme_remove,
+       .remove         = __devexit_p(snd_gusextreme_remove),
        /* FIXME: suspend/resume */
        .driver         = {
                .name   = GUSEXTREME_DRIVER
index c1c69e3cbfd040c3ee7636d0a7c0feec6a6fac8a..d1ad90ca035de59760b9b500aa139372e0b47586 100644 (file)
@@ -85,7 +85,7 @@ struct snd_gusmax {
 
 #define PFX    "gusmax: "
 
-static int __init snd_gusmax_detect(struct snd_gus_card * gus)
+static int __devinit snd_gusmax_detect(struct snd_gus_card * gus)
 {
        unsigned char d;
 
@@ -127,7 +127,8 @@ static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id)
        return IRQ_RETVAL(handled);
 }
 
-static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gus_card * gus)
+static void __devinit snd_gusmax_init(int dev, struct snd_card *card,
+                                     struct snd_gus_card * gus)
 {
        gus->equal_irq = 1;
        gus->codec_flag = 1;
@@ -145,7 +146,7 @@ static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gu
 #define CS4231_PRIVATE( left, right, shift, mute ) \
                        ((left << 24)|(right << 16)|(shift<<8)|mute)
 
-static int __init snd_gusmax_mixer(struct snd_cs4231 *chip)
+static int __devinit snd_gusmax_mixer(struct snd_cs4231 *chip)
 {
        struct snd_card *card = chip->card;
        struct snd_ctl_elem_id id1, id2;
@@ -204,7 +205,7 @@ static void snd_gusmax_free(struct snd_card *card)
                free_irq(maxcard->irq, (void *)maxcard);
 }
 
-static int __init snd_gusmax_probe(struct platform_device *pdev)
+static int __devinit snd_gusmax_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
@@ -348,7 +349,7 @@ static int __init snd_gusmax_probe(struct platform_device *pdev)
        return err;
 }
 
-static int snd_gusmax_remove(struct platform_device *devptr)
+static int __devexit snd_gusmax_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -359,7 +360,7 @@ static int snd_gusmax_remove(struct platform_device *devptr)
 
 static struct platform_driver snd_gusmax_driver = {
        .probe          = snd_gusmax_probe,
-       .remove         = snd_gusmax_remove,
+       .remove         = __devexit_p(snd_gusmax_remove),
        /* FIXME: suspend/resume */
        .driver         = {
                .name   = GUSMAX_DRIVER
index 1e30713d2cada591a3a3228adf600356715227e8..f3db686b1c0c5da850bfeda7bb790e59df9d8cf6 100644 (file)
@@ -919,7 +919,7 @@ static int __devinit snd_opl3sa2_nonpnp_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int snd_opl3sa2_nonpnp_remove(struct platform_device *devptr)
+static int __devexit snd_opl3sa2_nonpnp_remove(struct platform_device *devptr)
 {
        snd_card_free(platform_get_drvdata(devptr));
        platform_set_drvdata(devptr, NULL);
@@ -942,7 +942,7 @@ static int snd_opl3sa2_nonpnp_resume(struct platform_device *dev)
 
 static struct platform_driver snd_opl3sa2_nonpnp_driver = {
        .probe          = snd_opl3sa2_nonpnp_probe,
-       .remove         = snd_opl3sa2_nonpnp_remove,
+       .remove         = __devexit( snd_opl3sa2_nonpnp_remove),
 #ifdef CONFIG_PM
        .suspend        = snd_opl3sa2_nonpnp_suspend,
        .resume         = snd_opl3sa2_nonpnp_resume,
index 268ebd34703ec1fa821b5c31083b16e7bd6bb3a8..be1e83e6dea32b7132e252416c83fa2dae7872b1 100644 (file)
@@ -83,7 +83,7 @@ static void snd_sb8_free(struct snd_card *card)
        release_and_free_resource(acard->fm_res);
 }
 
-static int __init snd_sb8_probe(struct platform_device *pdev)
+static int __devinit snd_sb8_probe(struct platform_device *pdev)
 {
        int dev = pdev->id;
        struct snd_sb *chip;
@@ -193,7 +193,7 @@ static int __init snd_sb8_probe(struct platform_device *pdev)
        return err;
 }
 
-static int snd_sb8_remove(struct platform_device *pdev)
+static int __devexit snd_sb8_remove(struct platform_device *pdev)
 {
        snd_card_free(platform_get_drvdata(pdev));
        platform_set_drvdata(pdev, NULL);
@@ -230,7 +230,7 @@ static int snd_sb8_resume(struct platform_device *dev)
 
 static struct platform_driver snd_sb8_driver = {
        .probe          = snd_sb8_probe,
-       .remove         = snd_sb8_remove,
+       .remove         = __devexit_p(snd_sb8_remove),
 #ifdef CONFIG_PM
        .suspend        = snd_sb8_suspend,
        .resume         = snd_sb8_resume,