summaryrefslogtreecommitdiffstats
path: root/sound/isa/sb/sb16.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-30 23:57:05 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-30 23:57:05 -0500
commit5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch)
tree8291998abd73055de6f487fafa174ee2a5d3afee /sound/isa/sb/sb16.c
parent6edae708bf77e012d855a7e2c7766f211d234f4f (diff)
parent3f0a6766e0cc5a577805732e5adb50a585c58175 (diff)
downloadblackbird-op-linux-5bc65793cbf8da0d35f19ef025dda22887e79e80.tar.gz
blackbird-op-linux-5bc65793cbf8da0d35f19ef025dda22887e79e80.zip
[SCSI] Merge up to linux-2.6 head
Conflicts: drivers/scsi/jazz_esp.c Same changes made by both SCSI and SPARC trees: problem with UTF-8 conversion in the copyright. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'sound/isa/sb/sb16.c')
-rw-r--r--sound/isa/sb/sb16.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 2a19b0a39eda..c4ba24bfd27c 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -129,6 +129,7 @@ MODULE_PARM_DESC(seq_ports, "Number of sequencer ports for WaveTable synth.");
#endif
#ifdef CONFIG_PNP
+static int isa_registered;
static int pnp_registered;
#endif
@@ -702,15 +703,18 @@ static int __init alsa_card_sb16_init(void)
int err;
err = isa_register_driver(&snd_sb16_isa_driver, SNDRV_CARDS);
- if (err < 0)
- return err;
#ifdef CONFIG_PNP
- /* PnP cards at last */
+ if (!err)
+ isa_registered = 1;
+
err = pnp_register_card_driver(&sb16_pnpc_driver);
if (!err)
pnp_registered = 1;
+
+ if (isa_registered)
+ err = 0;
#endif
- return 0;
+ return err;
}
static void __exit alsa_card_sb16_exit(void)
@@ -718,8 +722,9 @@ static void __exit alsa_card_sb16_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&sb16_pnpc_driver);
+ if (isa_registered)
#endif
- isa_unregister_driver(&snd_sb16_isa_driver);
+ isa_unregister_driver(&snd_sb16_isa_driver);
}
module_init(alsa_card_sb16_init)
OpenPOWER on IntegriCloud