aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 04:17:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:54 -0500
commitebdb71ea7b384ff3f32dd038dba0aad58580e832 (patch)
tree3c9948bd9d938361700aef4d77034d79aa686893 /sound/isa/gus
parent6a3a3a0260cf5a4e5942db8d56cae4db4dc139a6 (diff)
[PATCH] PNP: adjust pnp_register_card_driver() signature: interwave
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/gus')
-rw-r--r--sound/isa/gus/interwave.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 2cacd0fa6871..de71b7a99c83 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -791,7 +791,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
791 return 0; 791 return 0;
792} 792}
793 793
794static int __init snd_interwave_nonpnp_probe1(int dev, struct platform_device *devptr) 794static int __devinit snd_interwave_nonpnp_probe1(int dev, struct platform_device *devptr)
795{ 795{
796 struct snd_card *card; 796 struct snd_card *card;
797 int err; 797 int err;
@@ -809,7 +809,7 @@ static int __init snd_interwave_nonpnp_probe1(int dev, struct platform_device *d
809 return 0; 809 return 0;
810} 810}
811 811
812static int __init snd_interwave_nonpnp_probe(struct platform_device *pdev) 812static int __devinit snd_interwave_nonpnp_probe(struct platform_device *pdev)
813{ 813{
814 int dev = pdev->id; 814 int dev = pdev->id;
815 int err; 815 int err;
@@ -867,6 +867,7 @@ static struct platform_driver snd_interwave_driver = {
867}; 867};
868 868
869#ifdef CONFIG_PNP 869#ifdef CONFIG_PNP
870static unsigned int __devinitdata interwave_pnp_devices;
870 871
871static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard, 872static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard,
872 const struct pnp_card_device_id *pid) 873 const struct pnp_card_device_id *pid)
@@ -897,6 +898,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *pcard,
897 } 898 }
898 pnp_set_card_drvdata(pcard, card); 899 pnp_set_card_drvdata(pcard, card);
899 dev++; 900 dev++;
901 interwave_pnp_devices++;
900 return 0; 902 return 0;
901} 903}
902 904
@@ -954,10 +956,10 @@ static int __init alsa_card_interwave_init(void)
954 } 956 }
955 957
956 /* ISA PnP cards */ 958 /* ISA PnP cards */
957 i = pnp_register_card_driver(&interwave_pnpc_driver); 959 err = pnp_register_card_driver(&interwave_pnpc_driver);
958 if (i >= 0) { 960 if (!err) {
959 pnp_registered = 1; 961 pnp_registered = 1;
960 cards += i; 962 cards += interwave_pnp_devices;;
961 } 963 }
962 964
963 if (!cards) { 965 if (!cards) {