Check sb0 configured in probe routine first

Pass configured irq back to isa
This commit is contained in:
Andrey A. Chernov 1997-03-26 17:41:16 +00:00
parent 348a8a6aab
commit 5c0c82997e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24299

View File

@ -294,8 +294,15 @@ reset_sb16midi (void)
int
probe_sb16midi (struct address_info *hw_config)
{
struct address_info *sb_config;
int ok = 0;
if (!(sb_config = sound_getconf (SNDCARD_SB)))
{
printk ("SB16 Error: Plain SB not configured\n");
return 0;
}
if (sbc_major < 4)
return 0; /* Not a SB16 */
@ -307,9 +314,10 @@ probe_sb16midi (struct address_info *hw_config)
ok = reset_sb16midi ();
sb16midi_detected = ok;
if (ok)
if (ok) {
hw_config->irq = sb_config->irq;
return 2;
else
} else
return 0;
}