aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 04:17:13 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:54 -0500
commitfea9739f2a1aed1cfb9b7af7cce66b28b68d4394 (patch)
tree032fbca13e0fd6724c9dd41d20a597aef2bf8a1d /sound
parent6736a6587b991477aae927c37176e8cab8689f9e (diff)
[PATCH] PNP: adjust pnp_register_card_driver() signature: es18xx
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/es18xx.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 721955d26194..9fbc185b4cc2 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2204,7 +2204,7 @@ static int __devinit snd_audiodrive_probe(struct snd_card *card, int dev)
2204 return snd_card_register(card); 2204 return snd_card_register(card);
2205} 2205}
2206 2206
2207static int __init snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devptr) 2207static int __devinit snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devptr)
2208{ 2208{
2209 struct snd_card *card; 2209 struct snd_card *card;
2210 int err; 2210 int err;
@@ -2221,7 +2221,7 @@ static int __init snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devp
2221 return 0; 2221 return 0;
2222} 2222}
2223 2223
2224static int __init snd_es18xx_nonpnp_probe(struct platform_device *pdev) 2224static int __devinit snd_es18xx_nonpnp_probe(struct platform_device *pdev)
2225{ 2225{
2226 int dev = pdev->id; 2226 int dev = pdev->id;
2227 int err; 2227 int err;
@@ -2297,6 +2297,8 @@ static struct platform_driver snd_es18xx_nonpnp_driver = {
2297 2297
2298 2298
2299#ifdef CONFIG_PNP 2299#ifdef CONFIG_PNP
2300static unsigned int __devinitdata es18xx_pnp_devices;
2301
2300static int __devinit snd_audiodrive_pnp_detect(struct pnp_card_link *pcard, 2302static int __devinit snd_audiodrive_pnp_detect(struct pnp_card_link *pcard,
2301 const struct pnp_card_device_id *pid) 2303 const struct pnp_card_device_id *pid)
2302{ 2304{
@@ -2327,6 +2329,7 @@ static int __devinit snd_audiodrive_pnp_detect(struct pnp_card_link *pcard,
2327 2329
2328 pnp_set_card_drvdata(pcard, card); 2330 pnp_set_card_drvdata(pcard, card);
2329 dev++; 2331 dev++;
2332 es18xx_pnp_devices++;
2330 return 0; 2333 return 0;
2331} 2334}
2332 2335
@@ -2397,10 +2400,10 @@ static int __init alsa_card_es18xx_init(void)
2397 } 2400 }
2398 2401
2399#ifdef CONFIG_PNP 2402#ifdef CONFIG_PNP
2400 i = pnp_register_card_driver(&es18xx_pnpc_driver); 2403 err = pnp_register_card_driver(&es18xx_pnpc_driver);
2401 if (i >= 0) { 2404 if (!err) {
2402 pnp_registered = 1; 2405 pnp_registered = 1;
2403 cards += i; 2406 cards += es18xx_pnp_devices;
2404 } 2407 }
2405#endif 2408#endif
2406 2409