diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 00:21:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 00:21:33 -0400 |
commit | b17bfca5f16a6090ee51250163e1720f6fe71515 (patch) | |
tree | b5c561e1c2b7db6ded4c2092486f66f7c8c35902 /sound/isa/gus/interwave.c | |
parent | 36dbe4d6bffb90fcb2663ac50af00a942412e246 (diff) | |
parent | a04395ead6d17c83da64264b6fe78f852a648202 (diff) |
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
[ALSA] usbaudio - Coping with short replies in usbmixer
[ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty
[ALSA] Fix probe of non-PnP ISA devices
[ALSA] version 1.0.14rc4
[ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops
[ALSA] ASoC AC97 device reg bugfix
[ALSA] ASoC AC97 static GPL symbol fix
[ALSA] hda-codec - Make the mixer capability check more robust
[ALSA] usb-audio: another Logitech QuickCam ID
Diffstat (limited to 'sound/isa/gus/interwave.c')
-rw-r--r-- | sound/isa/gus/interwave.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 3e4657255536..0220cdbe1a2a 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -135,6 +135,7 @@ struct snd_interwave { | |||
135 | 135 | ||
136 | 136 | ||
137 | #ifdef CONFIG_PNP | 137 | #ifdef CONFIG_PNP |
138 | static int isa_registered; | ||
138 | static int pnp_registered; | 139 | static int pnp_registered; |
139 | 140 | ||
140 | static struct pnp_card_device_id snd_interwave_pnpids[] = { | 141 | static struct pnp_card_device_id snd_interwave_pnpids[] = { |
@@ -934,15 +935,18 @@ static int __init alsa_card_interwave_init(void) | |||
934 | int err; | 935 | int err; |
935 | 936 | ||
936 | err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS); | 937 | err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS); |
937 | if (err < 0) | ||
938 | return err; | ||
939 | #ifdef CONFIG_PNP | 938 | #ifdef CONFIG_PNP |
940 | /* ISA PnP cards */ | 939 | if (!err) |
940 | isa_registered = 1; | ||
941 | |||
941 | err = pnp_register_card_driver(&interwave_pnpc_driver); | 942 | err = pnp_register_card_driver(&interwave_pnpc_driver); |
942 | if (!err) | 943 | if (!err) |
943 | pnp_registered = 1; | 944 | pnp_registered = 1; |
945 | |||
946 | if (isa_registered) | ||
947 | err = 0; | ||
944 | #endif | 948 | #endif |
945 | return 0; | 949 | return err; |
946 | } | 950 | } |
947 | 951 | ||
948 | static void __exit alsa_card_interwave_exit(void) | 952 | static void __exit alsa_card_interwave_exit(void) |
@@ -950,8 +954,9 @@ static void __exit alsa_card_interwave_exit(void) | |||
950 | #ifdef CONFIG_PNP | 954 | #ifdef CONFIG_PNP |
951 | if (pnp_registered) | 955 | if (pnp_registered) |
952 | pnp_unregister_card_driver(&interwave_pnpc_driver); | 956 | pnp_unregister_card_driver(&interwave_pnpc_driver); |
957 | if (isa_registered) | ||
953 | #endif | 958 | #endif |
954 | isa_unregister_driver(&snd_interwave_driver); | 959 | isa_unregister_driver(&snd_interwave_driver); |
955 | } | 960 | } |
956 | 961 | ||
957 | module_init(alsa_card_interwave_init) | 962 | module_init(alsa_card_interwave_init) |