aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 04:17:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:55 -0500
commitc94ded6e602594c8e66fd5b1ba832d5327f5c103 (patch)
treee0c9a0ba3b84e6e5c93d3ec02035ae4f900d6c34 /sound
parent38125956441c5cab28333414cee308d162507477 (diff)
[PATCH] PNP: adjust pnp_register_card_driver() signature: wavefront
Remove the assumption that pnp_register_card_driver() returns the number of devices claimed. And fix some __init/__devinit issues. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Jaroslav Kysela <perex@suse.cz> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/wavefront/wavefront.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index c0115bf9065e..2f13cd5d4dcb 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -589,7 +589,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
589 return snd_card_register(card); 589 return snd_card_register(card);
590} 590}
591 591
592static int __init snd_wavefront_nonpnp_probe(struct platform_device *pdev) 592static int __devinit snd_wavefront_nonpnp_probe(struct platform_device *pdev)
593{ 593{
594 int dev = pdev->id; 594 int dev = pdev->id;
595 struct snd_card *card; 595 struct snd_card *card;
@@ -637,6 +637,7 @@ static struct platform_driver snd_wavefront_driver = {
637 637
638 638
639#ifdef CONFIG_PNP 639#ifdef CONFIG_PNP
640static unsigned int __devinitdata wavefront_pnp_devices;
640 641
641static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *pcard, 642static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
642 const struct pnp_card_device_id *pid) 643 const struct pnp_card_device_id *pid)
@@ -670,6 +671,7 @@ static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
670 671
671 pnp_set_card_drvdata(pcard, card); 672 pnp_set_card_drvdata(pcard, card);
672 dev++; 673 dev++;
674 wavefront_pnp_devices++;
673 return 0; 675 return 0;
674} 676}
675 677
@@ -729,10 +731,10 @@ static int __init alsa_card_wavefront_init(void)
729 } 731 }
730 732
731#ifdef CONFIG_PNP 733#ifdef CONFIG_PNP
732 i = pnp_register_card_driver(&wavefront_pnpc_driver); 734 err = pnp_register_card_driver(&wavefront_pnpc_driver);
733 if (i >= 0) { 735 if (!err) {
734 pnp_registered = 1; 736 pnp_registered = 1;
735 cards += i; 737 cards += wavefront_pnp_devices;
736 } 738 }
737#endif 739#endif
738 740