X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fsb_card.c;h=07191b3ae706f1153bae5635b9c2596be778ef96;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=012f6d2d88de9037300dd6f4a7d958cec30283c9;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 012f6d2d8..07191b3ae 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c @@ -100,7 +100,14 @@ MODULE_PARM_DESC(uart401, "When set to 1, will attempt to detect and enable"\ /* OSS subsystem card registration shared by PnP and legacy routines */ static int sb_register_oss(struct sb_card_config *scc, struct sb_module_options *sbmo) { - if(!sb_dsp_detect(&scc->conf, 0, 0, sbmo)) { + if (!request_region(scc->conf.io_base, 16, "soundblaster")) { + printk(KERN_ERR "sb: ports busy.\n"); + kfree(scc); + return -EBUSY; + } + + if (!sb_dsp_detect(&scc->conf, 0, 0, sbmo)) { + release_region(scc->conf.io_base, 16); printk(KERN_ERR "sb: Failed DSP Detect.\n"); kfree(scc); return -ENODEV;