--- /drivers/sound/sb_card.c Wed Nov 22 16:07:07 2000 +++ sb_card.c Wed Nov 22 16:11:30 2000 @@ -50,6 +50,10 @@ * * 21-09-2000 Got rid of attach_sbmpu * Arnaldo Carvalho de Melo + * + * 22-11-2000 Fixed bug that a ESS1868 was detected two times + * merged sb_isapnp_init into sb_init to make this possible + * Martin Heiß */ #include @@ -498,10 +502,12 @@ static struct pci_dev *sb_init(struct pci_bus *bus, struct address_info *hw_config, struct address_info *mpu_config, int slot, int card) { + char *busname = bus->name[0] ? bus->name : sb_isapnp_list[slot].name; /* Configure Audio device */ if((sb_dev[card] = isapnp_find_dev(bus, sb_isapnp_list[slot].audio_vendor, sb_isapnp_list[slot].audio_function, NULL))) { int ret; + printk(KERN_INFO "sb: %s detected\n", busname); ret = sb_dev[card]->prepare(sb_dev[card]); /* If device is active, assume configured with /proc/isapnp * and use anyway. Some other way to check this? */ @@ -521,8 +527,12 @@ hw_config->dma2 = sb_dev[card]->dma_resource[sb_isapnp_list[slot].dma2].start; else hw_config->dma2 = -1; + printk(KERN_NOTICE "sb: ISAPnP reports '%s' at i/o %#x, irq %d, dma %d, %d\n", busname, hw_config->io_base, hw_config->irq, hw_config->dma, hw_config->dma2); } else + { + printk(KERN_INFO "sb: Failed to initialize %s\n", busname); return(NULL); + } } else return(NULL); @@ -587,29 +597,6 @@ return(sb_dev[card]); } -static int __init sb_isapnp_init(struct address_info *hw_config, struct address_info *mpu_config, struct pci_bus *bus, int slot, int card) -{ - char *busname = bus->name[0] ? bus->name : sb_isapnp_list[slot].name; - - printk(KERN_INFO "sb: %s detected\n", busname); - - /* Initialize this baby. */ - - if(sb_init(bus, hw_config, mpu_config, slot, card)) { - /* We got it. */ - - printk(KERN_NOTICE "sb: ISAPnP reports '%s' at i/o %#x, irq %d, dma %d, %d\n", - busname, - hw_config->io_base, hw_config->irq, hw_config->dma, - hw_config->dma2); - return 1; - } - else - printk(KERN_INFO "sb: Failed to initialize %s\n", busname); - - return 0; -} - static int __init sb_isapnp_probe(struct address_info *hw_config, struct address_info *mpu_config, int card) { static int first = 1; @@ -636,7 +623,7 @@ sb_isapnp_list[i].card_device, bus))) { - if(sb_isapnp_init(hw_config, mpu_config, bus, i, card)) { + if(sb_init(bus, hw_config, mpu_config, i, card)) { isapnpjump = i; /* start next search from here */ return 0; }