summaryrefslogtreecommitdiff
path: root/sound/isa
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 13:17:18 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 20:44:55 +0400
commitc94ded6e602594c8e66fd5b1ba832d5327f5c103 (patch)
treee0c9a0ba3b84e6e5c93d3ec02035ae4f900d6c34 /sound/isa
parent38125956441c5cab28333414cee308d162507477 (diff)
downloadlinux-c94ded6e602594c8e66fd5b1ba832d5327f5c103.tar.xz
[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/isa')
-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)
return snd_card_register(card);
}
-static int __init snd_wavefront_nonpnp_probe(struct platform_device *pdev)
+static int __devinit snd_wavefront_nonpnp_probe(struct platform_device *pdev)
{
int dev = pdev->id;
struct snd_card *card;
@@ -637,6 +637,7 @@ static struct platform_driver snd_wavefront_driver = {
#ifdef CONFIG_PNP
+static unsigned int __devinitdata wavefront_pnp_devices;
static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
@@ -670,6 +671,7 @@ static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
pnp_set_card_drvdata(pcard, card);
dev++;
+ wavefront_pnp_devices++;
return 0;
}
@@ -729,10 +731,10 @@ static int __init alsa_card_wavefront_init(void)
}
#ifdef CONFIG_PNP
- i = pnp_register_card_driver(&wavefront_pnpc_driver);
- if (i >= 0) {
+ err = pnp_register_card_driver(&wavefront_pnpc_driver);
+ if (!err) {
pnp_registered = 1;
- cards += i;
+ cards += wavefront_pnp_devices;
}
#endif