diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
commit | 03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch) | |
tree | 88db8dba75ae06ba3bad08e42c5e52efc162535c /drivers/sound/sb_card.c | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'drivers/sound/sb_card.c')
-rw-r--r-- | drivers/sound/sb_card.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/sound/sb_card.c b/drivers/sound/sb_card.c index 432501ebc..2fc88cb24 100644 --- a/drivers/sound/sb_card.c +++ b/drivers/sound/sb_card.c @@ -25,7 +25,8 @@ void attach_sb_card(struct address_info *hw_config) { #if defined(CONFIG_AUDIO) || defined(CONFIG_MIDI) - sb_dsp_init(hw_config); + if(!sb_dsp_init(hw_config)) + hw_config->slots[0] = -1; #endif } @@ -41,7 +42,8 @@ int probe_sb(struct address_info *hw_config) void unload_sb(struct address_info *hw_config) { - sb_dsp_unload(hw_config); + if(hw_config->slots[0]!=-1) + sb_dsp_unload(hw_config); } int sb_be_quiet=0; @@ -92,7 +94,7 @@ int init_module(void) { if (io == -1 || dma == -1 || irq == -1) { - printk(KERN_ERR "I/O, IRQ, and DMA are mandatory\n"); + printk(KERN_ERR "sb_card: I/O, IRQ, and DMA are mandatory\n"); return -EINVAL; } config.io_base = io; @@ -104,6 +106,9 @@ int init_module(void) if (!probe_sb(&config)) return -ENODEV; attach_sb_card(&config); + + if(config.slots[0]==-1) + return -ENODEV; #ifdef CONFIG_MIDI config_mpu.io_base = mpu_io; if (mpu_io && probe_sbmpu(&config_mpu)) |