summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 01:17:15 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:44:54 -0800
commit312fef308cb15e793d8902f1dbd318d01268d36e (patch)
tree0867a21d522155b9aed0a81ad584de7628fdbe3d /sound
parentebdb71ea7b384ff3f32dd038dba0aad58580e832 (diff)
downloadop-kernel-dev-312fef308cb15e793d8902f1dbd318d01268d36e.zip
op-kernel-dev-312fef308cb15e793d8902f1dbd318d01268d36e.tar.gz
[PATCH] PNP: adjust pnp_register_card_driver() signature: sb16
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/sb/sb16.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 5737ab7..21ea659 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -369,7 +369,7 @@ static struct snd_card *snd_sb16_card_new(int dev)
return card;
}
-static int __init snd_sb16_probe(struct snd_card *card, int dev)
+static int __devinit snd_sb16_probe(struct snd_card *card, int dev)
{
int xirq, xdma8, xdma16;
struct snd_sb *chip;
@@ -518,7 +518,7 @@ static int snd_sb16_resume(struct snd_card *card)
}
#endif
-static int __init snd_sb16_nonpnp_probe1(int dev, struct platform_device *devptr)
+static int __devinit snd_sb16_nonpnp_probe1(int dev, struct platform_device *devptr)
{
struct snd_card_sb16 *acard;
struct snd_card *card;
@@ -548,7 +548,7 @@ static int __init snd_sb16_nonpnp_probe1(int dev, struct platform_device *devptr
}
-static int __init snd_sb16_nonpnp_probe(struct platform_device *pdev)
+static int __devinit snd_sb16_nonpnp_probe(struct platform_device *pdev)
{
int dev = pdev->id;
int err;
@@ -629,6 +629,7 @@ static struct platform_driver snd_sb16_nonpnp_driver = {
#ifdef CONFIG_PNP
+static unsigned int __devinitdata sb16_pnp_devices;
static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
@@ -651,6 +652,7 @@ static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *pcard,
}
pnp_set_card_drvdata(pcard, card);
dev++;
+ sb16_pnp_devices++;
return 0;
}
@@ -727,10 +729,10 @@ static int __init alsa_card_sb16_init(void)
}
#ifdef CONFIG_PNP
/* PnP cards at last */
- i = pnp_register_card_driver(&sb16_pnpc_driver);
- if (i >= 0) {
+ err = pnp_register_card_driver(&sb16_pnpc_driver);
+ if (!err) {
pnp_registered = 1;
- cards += i;
+ cards += sb16_pnp_devices;
}
#endif
OpenPOWER on IntegriCloud