: Fix __devinit and __devexit issues with sound drivers
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Fri, 9 Feb 2007 09:49:03 -0500,
Quoted 15 lines · Prarit Bhargava
Fix
__devinitand__devexitissues 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' (atoffset 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)
Quoted 1 line
Signed-off-by Prarit Bhargava <[email protected]>
Thanks for the patch. But I'm afraid we need to change more from __init* to __devinit*, i.e. the functions called from __devinit shouldn't be __init but also __deveinit (for example, some functions in sound/drivers/dummy.c should be __devinit too). Ditto for __initdata.
Also, could you separate patches for sound/oss/* and others? We keep only ALSA stuff in our tree and it's not easy to apply the patches to old OSS drivers all together.
More comments below...
Quoted 21 lines
sound/aoa/soundbus/i2sbus/i2sbus-core.c +2
-2@@ -321,7 +321,7 @@ static int i2sbus_add_dev(struct macio_dreturn 0 ; } -static int i2sbus_probe (struct macio_dev * dev,const struct of_device_id *match) +static int __devinit i2sbus_probe (struct macio_dev * dev,const struct of_device_id *match) {struct device_node *np =NULL ;int got =0 , err;@@ -353,7 +353,7 @@ static int i2sbus_probe(struct macio_devreturn 0 ; } -static int i2sbus_remove (struct macio_dev * dev) +static int __devexit i2sbus_remove(struct macio_dev* dev) {struct i2sbus_control *control = dev->ofdev.dev.driver_data;struct i2sbus_dev *i2sdev, *tmp;
sound/aoa/soundbus/i2sbus/i2sbus-core.c static struct macio_driver i2sbus_drv = · line 438
Quoted 8 lines
sound/aoa/soundbus/i2sbus/i2sbus-core.c +1
-1@@ -432,7 +432,7 @@ static struct macio_driver i2sbus_drv = .owner = THIS_MODULE, .match_table = i2sbus_match, .probe = i2sbus_probe, - .remove = i2sbus_remove, + .remove =__devexit_p (i2sbus_remove), #ifdef CONFIG_PM .suspend = i2sbus_suspend, .resume = i2sbus_resume,
Hm, I'm not pretty sure this is OK, especially in error paths. We'll need a double check.
Quoted 21 lines
sound/aoa/soundbus/core.c +2
-2@@ -34,7 +34,7 @@ void soundbus_dev_put(struct soundbus_de }EXPORT_SYMBOL_GPL (soundbus_dev_put); -static int soundbus_probe (struct device *dev) +static int __devinit soundbus_probe (struct device *dev) {int error = -ENODEV ;struct soundbus_driver *drv;@@ -134,7 +134,7 @@ static int soundbus_uevent(struct devicereturn 0 ; } -static int soundbus_device_remove (struct device *dev) +static int __devexit soundbus_device_remove(struct device *dev) {struct soundbus_dev * soundbus_dev =to_soundbus_device (dev);struct soundbus_driver * drv =to_soundbus_driver (dev->driver);
sound/aoa/soundbus/core.c static struct bus_type soundbus_bus_type · line 191
Quoted 8 lines
sound/aoa/soundbus/core.c +1
-1@@ -185,7 +185,7 @@ static struct bus_type soundbus_bus_type .name = "aoa-soundbus", .probe = soundbus_probe, .uevent = soundbus_uevent, - .remove = soundbus_device_remove, + .remove = __devexit_p(soundbus_device_remove), .shutdown = soundbus_device_shutdown, #ifdef CONFIG_PM .suspend = soundbus_device_suspend,
Ditto.
Quoted 21 lines
sound/arm/pxa2xx-ac97.c +2
-2@@ -305,7 +305,7 @@ static int pxa2xx_ac97_resume(struct pla#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 platreturn 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);
sound/arm/pxa2xx-ac97.c static int pxa2xx_ac97_remove(struct pla · line 392
Quoted 8 lines
sound/arm/pxa2xx-ac97.c +1
-1@@ -386,7 +386,7 @@ static int pxa2xx_ac97_remove(struct plastatic 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 = {
That looks good.
Quoted 21 lines
sound/drivers/dummy.c +2
-2@@ -579,7 +579,7 @@ static int __init snd_card_dummy_new_mixreturn 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 +617,7 @@ static int __init snd_dummy_probe(structreturn 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 );
sound/drivers/dummy.c static int snd_dummy_resume(struct platf · line 654
Quoted 8 lines
sound/drivers/dummy.c +1
-1@@ -648,7 +648,7 @@ static int snd_dummy_resume(struct platfstatic 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,
That's OK, too. But don't forget to change other __init*.
Quoted 39 lines
sound/drivers/mtpav.c +4
-4@@ -619,7 +619,7 @@ static struct snd_rawmidi_ops snd_mtpav_* 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(ststrcpy (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_ca/* */ -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(structreturn 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 );
sound/drivers/mtpav.c static int snd_mtpav_remove(struct platf · line 762
Quoted 8 lines
sound/drivers/mtpav.c +1
-1@@ -756,7 +756,7 @@ static int snd_mtpav_remove(struct platfstatic 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 },
Also other functions with __init should be changed.
Quoted 12 lines
sound/drivers/mts64.c +1
-1@@ -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);
sound/drivers/mts64.c static int snd_mts64_remove(struct platf · line 1045
Quoted 8 lines
sound/drivers/mts64.c +1
-1@@ -1039,7 +1039,7 @@ static int snd_mts64_remove(struct platfstatic struct platform_driver snd_mts64_driver = { .probe = snd_mts64_probe, - .remove = snd_mts64_remove, + .remove =__devexit_p (snd_mts64_remove), .driver = { .name =PLATFORM_DRIVER }
This looks OK.
Quoted 39 lines
sound/drivers/serial-u16550.c +4
-4@@ -841,7 +841,7 @@ static int __init snd_uart16550_create(sreturn 0 ; } -static void __init snd_uart16550_substreams (struct snd_rawmidi_str *stream) +static void __devinit snd_uart16550_substreams (struct snd_rawmidi_str *stream) {struct list_head *list;@@ -851,7 +851,7 @@ static void __init snd_uart16550_substre } } -static int __init snd_uart16550_rmidi (snd_uart16550_t *uart,int device,int outs,int ins,struct snd_rawmidi **rmidi) +static int __devinit snd_uart16550_rmidi (snd_uart16550_t *uart,int device,int outs,int ins,struct snd_rawmidi **rmidi) {struct snd_rawmidi *rrawmidi;int err;@@ -872,7 +872,7 @@ static int __init snd_uart16550_rmidi(snreturn 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;snd_uart16550_t *uart;@@ -956,7 +956,7 @@ static int __init snd_serial_probe(strucreturn 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 );
sound/drivers/serial-u16550.c static int snd_serial_remove(struct plat · line 973
Quoted 8 lines
sound/drivers/serial-u16550.c +1
-1@@ -967,7 +967,7 @@ static int snd_serial_remove(struct platstatic 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 },
Still other __init are there.
Quoted 21 lines
sound/drivers/virmidi.c +2
-2@@ -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(strureturn 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 );
sound/drivers/virmidi.c static int snd_virmidi_remove(struct pla · line 146
Quoted 8 lines
sound/drivers/virmidi.c +1
-1@@ -140,7 +140,7 @@ static int snd_virmidi_remove(struct plastatic 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 },
This looks OK.
Quoted 90 lines
sound/isa/es1688/es1688.c +3
-3@@ -73,7 +73,7 @@ static struct platform_device *devices[S#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(strucreturn 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 platstatic 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 sound/isa/sb/sb8.c +3
-3@@ -83,7 +83,7 @@ static void snd_sb8_free(struct snd_cardrelease_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 preturn 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 platforstatic 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,sound/isa/opl3sa2.c +2
-2@@ -919,7 +919,7 @@ static int __devinit snd_opl3sa2_nonpnp_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(strstatic 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,sound/isa/cmi8330.c +1
-1@@ -574,7 +574,7 @@ static int __devinit snd_cmi8330_nonpnp_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 );
sound/isa/cmi8330.c static int snd_cmi8330_nonpnp_resume(str · line 603
Quoted 8 lines
sound/isa/cmi8330.c +1
-1@@ -597,7 +597,7 @@ static int snd_cmi8330_nonpnp_resume(strstatic 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,
These look fine, too.
Quoted 21 lines
sound/isa/gus/gusmax.c +2
-2@@ -204,7 +204,7 @@ static void snd_gusmax_free(struct snd_cfree_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 +348,7 @@ static int __init snd_gusmax_probe(strucreturn 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 );
sound/isa/gus/gusmax.c static int snd_gusmax_remove(struct plat · line 365
Quoted 8 lines
sound/isa/gus/gusmax.c +1
-1@@ -359,7 +359,7 @@ static int snd_gusmax_remove(struct platstatic 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
There are more __init*.
Quoted 50 lines
sound/isa/gus/gusclassic.c +3
-3@@ -103,7 +103,7 @@ static void __init snd_gusclassic_init(i 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(sreturn 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(structstatic 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 sound/isa/gus/gusextreme.c +2
-2@@ -169,7 +169,7 @@ static int __init snd_gusextreme_mixer(sreturn 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(sreturn 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 );
sound/isa/gus/gusextreme.c static int snd_gusextreme_remove(struct · line 338
Quoted 8 lines
sound/isa/gus/gusextreme.c +1
-1@@ -332,7 +332,7 @@ static int snd_gusextreme_remove(structstatic 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
... in these, too.
Quoted 21 lines
sound/oss/sb_card.c +2
-2@@ -237,7 +237,7 @@ static void sb_dev2cfg(struct pnp_dev *dstatic unsigned int sb_pnp_devices;/* Probe callback function for the PnP API */ -static int sb_pnp_probe (struct pnp_card_link *card,const struct pnp_card_device_id *card_id) +static int __devinit sb_pnp_probe (struct pnp_card_link *card,const struct pnp_card_device_id *card_id) {struct sb_card_config *scc;struct sb_module_options sbmo = {0 };/* Default to 0 for PnP */ @@ -271,7 +271,7 @@ static int sb_pnp_probe(struct pnp_card_return sb_register_oss (scc, &sbmo); } -static void sb_pnp_remove (struct pnp_card_link *card) +static void __devexit sb_pnp_remove(struct pnp_card_link *card) {struct sb_card_config *scc =pnp_get_card_drvdata (card);
sound/oss/sb_card.c static struct pnp_card_driver sb_pnp_dri · line 293
Quoted 8 lines
sound/oss/sb_card.c +1
-1@@ -287,7 +287,7 @@ static struct pnp_card_driver sb_pnp_dri .name = "OSS SndBlstr", /* 16 character limit */ .id_table = sb_pnp_card_table, .probe = sb_pnp_probe, - .remove = sb_pnp_remove, + .remove =__devexit_p ( sb_pnp_remove), };MODULE_DEVICE_TABLE (pnp_card, sb_pnp_card_table);#endif /* CONFIG_PNP */
They look OK, but put them to a separate patch.
sound/oss/nm256_audio.c nm256_probe(struct pci_dev *pcidev,const · line 1243
Quoted 11 lines
sound/oss/nm256_audio.c +1
-1@@ -1237,7 +1237,7 @@ nm256_probe(struct pci_dev *pcidev,constreturn -1 ;/* should not come here ... */ } -static void __devinit +static void __devexitnm256_remove (struct pci_dev *pcidev) {struct nm256_info *xcard =pci_get_drvdata (pcidev);struct nm256_info *card,*next_card =NULL ;
Wow. A good catch.
sound/oss/nm256_audio.c MODULE_LICENSE("GPL"); · line 1638
Quoted 9 lines
sound/oss/nm256_audio.c +1
-1@@ -1632,7 +1632,7 @@ MODULE_LICENSE("GPL");static struct pci_driver nm256_pci_driver = { .name ="nm256_audio" , .id_table = nm256_pci_tbl, - .probe = nm256_probe, + .probe =__devexit_p (nm256_probe), .remove = nm256_remove, };
... But this isn't.
sound/parisc/harmony.c snd_harmony_remove(struct parisc_device · line 1025
Quoted 11 lines
sound/parisc/harmony.c +1
-1@@ -1019,7 +1019,7 @@ snd_harmony_remove(struct parisc_devicestatic struct parisc_driver snd_harmony_driver = { .name ="harmony" , .id_table = snd_harmony_devtable, - .probe = snd_harmony_probe, + .probe =__devexit_p (snd_harmony_probe), .remove = snd_harmony_remove, };
This also bad.
Quoted 21 lines
sound/pcmcia/vx/vxpocket.c +2
-2@@ -289,7 +289,7 @@ static int vxp_resume(struct pcmcia_devi/* */ -static int vxpocket_probe (struct pcmcia_device *p_dev) +static int __devinit vxpocket_probe (struct pcmcia_device *p_dev) {struct snd_card *card;struct snd_vxpocket *vxp;@@ -329,7 +329,7 @@ static int vxpocket_probe(struct pcmcia_return vxpocket_config (p_dev); } -static void vxpocket_detach (struct pcmcia_device *link) +static void __devexit vxpocket_detach(struct pcmcia_device *link) {struct snd_vxpocket *vxp;struct vx_core *chip;
sound/pcmcia/vx/vxpocket.c static struct pcmcia_driver vxp_cs_drive · line 369
Quoted 8 lines
sound/pcmcia/vx/vxpocket.c +1
-1@@ -363,7 +363,7 @@ static struct pcmcia_driver vxp_cs_drive .name = "snd-vxpocket", }, .probe = vxpocket_probe, - .remove = vxpocket_detach, + .remove = __devexit_p(vxpocket_detach), .id_table = vxp_ids, #ifdef CONFIG_PM .suspend = vxp_suspend,
I haven't seen pcmcia (-cs) drivers with __dev* prefix, so I'm not 100% sure that's correct although it should work, I guess.
Quoted 22 lines
sound/pcmcia/pdaudiocf/pdaudiocf.c +2
-2@@ -90,7 +90,7 @@ static int snd_pdacf_dev_free(struct snd/* * snd_pdacf_attach - attach callback for cs */ -static int snd_pdacf_probe (struct pcmcia_device *link) +static int __devinit snd_pdacf_probe (struct pcmcia_device *link) {int i;struct snd_pdacf *pdacf;@@ -196,7 +196,7 @@ static int snd_pdacf_assign_resources(st/* * snd_pdacf_detach - detach callback for cs */ -static void snd_pdacf_detach (struct pcmcia_device *link) +static void __devexit snd_pdacf_detach(struct pcmcia_device *link) {struct snd_pdacf *chip = link->priv;
sound/pcmcia/pdaudiocf/pdaudiocf.c static struct pcmcia_driver pdacf_cs_dri · line 296
Quoted 8 lines
sound/pcmcia/pdaudiocf/pdaudiocf.c +1
-1@@ -290,7 +290,7 @@ static struct pcmcia_driver pdacf_cs_dri .name = "snd-pdaudiocf", }, .probe = snd_pdacf_probe, - .remove = snd_pdacf_detach, + .remove = __devexit_p(snd_pdacf_detach), .id_table = snd_pdacf_ids, #ifdef CONFIG_PM .suspend = pdacf_suspend,
Ditto.
Thanks,
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 21 lines · Takashi Iwai
At Fri, 9 Feb 2007 09:49:03 -0500,
Quoted 16 lines · Prarit Bhargava
Fix
__devinitand__devexitissues 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' (atoffset 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 <[email protected]>
Sorry for the late reply Takashi -- I got tied up with a few other things.
Quoted 7 lines
Thanks for the patch. But I'm afraid we need to change more from __init* to __devinit*, i.e. the functions called from
__devinitshouldn't be__initbut also__deveinit(for example, some functions insound/drivers/dummy.cshould be__devinittoo). Ditto for__initdata.
It's odd that MODPOST didn't kick out more warnings. I was relying on it to complain about __init & __devinit collisions. I've ping'd a few others to see if we can figure out why no further errors were output.
Quoted 5 lines
Also, could you separate patches for
sound/oss/*and others? We keep only ALSA stuff in our tree and it's not easy to apply the patches to old OSS drivers all together.
Sure -- new patcheset to follow.
P.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Wed, 14 Feb 2007 10:09:22 -0500,
Quoted 8 lines · Prarit Bhargava
Quoted 6 lines
Also, could you separate patches for
sound/oss/*and others? We keep only ALSA stuff in our tree and it's not easy to apply the patches to old OSS drivers all together.Sure -- new patcheset to follow.
Oh, I already merged some part of your patch with fixes, and it was pushed to 2.6.21 tree. The changes parts are in sound/drivers and sound/isa directories.
I'm not sure whether such changes to other ALSA parts are really safe, so I'll postpone. So, please make only the patches for sound/oss/*, and preferablly pass to Andrew.
Thanks,
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV