diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-27 01:17:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 08:44:54 -0800 |
commit | fea9739f2a1aed1cfb9b7af7cce66b28b68d4394 (patch) | |
tree | 032fbca13e0fd6724c9dd41d20a597aef2bf8a1d /sound/isa/es18xx.c | |
parent | 6736a6587b991477aae927c37176e8cab8689f9e (diff) | |
download | linux-fea9739f2a1aed1cfb9b7af7cce66b28b68d4394.tar.gz linux-fea9739f2a1aed1cfb9b7af7cce66b28b68d4394.tar.bz2 linux-fea9739f2a1aed1cfb9b7af7cce66b28b68d4394.zip |
[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/isa/es18xx.c')
-rw-r--r-- | sound/isa/es18xx.c | 13 |
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) return snd_card_register(card); } -static int __init snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devptr) +static int __devinit snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devptr) { struct snd_card *card; int err; @@ -2221,7 +2221,7 @@ static int __init snd_es18xx_nonpnp_probe1(int dev, struct platform_device *devp return 0; } -static int __init snd_es18xx_nonpnp_probe(struct platform_device *pdev) +static int __devinit snd_es18xx_nonpnp_probe(struct platform_device *pdev) { int dev = pdev->id; int err; @@ -2297,6 +2297,8 @@ static struct platform_driver snd_es18xx_nonpnp_driver = { #ifdef CONFIG_PNP +static unsigned int __devinitdata es18xx_pnp_devices; + static int __devinit snd_audiodrive_pnp_detect(struct pnp_card_link *pcard, const struct pnp_card_device_id *pid) { @@ -2327,6 +2329,7 @@ static int __devinit snd_audiodrive_pnp_detect(struct pnp_card_link *pcard, pnp_set_card_drvdata(pcard, card); dev++; + es18xx_pnp_devices++; return 0; } @@ -2397,10 +2400,10 @@ static int __init alsa_card_es18xx_init(void) } #ifdef CONFIG_PNP - i = pnp_register_card_driver(&es18xx_pnpc_driver); - if (i >= 0) { + err = pnp_register_card_driver(&es18xx_pnpc_driver); + if (!err) { pnp_registered = 1; - cards += i; + cards += es18xx_pnp_devices; } #endif |