snd_printk("unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1); 
snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1); 
int __devinit snd_cs46xx_create(snd_card_t * card,		      struct pci_dev * pci,		      int external_amp, int thinkpad,		      cs46xx_t ** rchip){	cs46xx_t *chip;	int err, idx;	snd_cs46xx_region_t *region;	struct cs_card_type *cp;	u16 ss_card, ss_vendor;	static snd_device_ops_t ops = {		.dev_free =	snd_cs46xx_dev_free,	};		*rchip = NULL;	/* enable PCI device */	if ((err = pci_enable_device(pci)) < 0)		return err;	chip = kzalloc(sizeof(*chip), GFP_KERNEL);	if (chip == NULL) {		pci_disable_device(pci);		return -ENOMEM;	}	spin_lock_init(&chip->reg_lock);#ifdef CONFIG_SND_CS46XX_NEW_DSP	init_MUTEX(&chip->spos_mutex);#endif	chip->card = card;	chip->pci = pci;	chip->irq = -1;	chip->ba0_addr = pci_resource_start(pci, 0);	chip->ba1_addr = pci_resource_start(pci, 1);	if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 ||	    chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) {	    	snd_printk("wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", chip->ba0_addr, chip->ba1_addr);	    	snd_cs46xx_free(chip);	    	return -ENOMEM;	}	region = &chip->region.name.ba0;	strcpy(region->name, "CS46xx_BA0");	region->base = chip->ba0_addr;	region->size = CS46XX_BA0_SIZE;	region = &chip->region.name.data0;	strcpy(region->name, "CS46xx_BA1_data0");	region->base = chip->ba1_addr + BA1_SP_DMEM0;	region->size = CS46XX_BA1_DATA0_SIZE;	region = &chip->region.name.data1;	strcpy(region->name, "CS46xx_BA1_data1");	region->base = chip->ba1_addr + BA1_SP_DMEM1;	region->size = CS46XX_BA1_DATA1_SIZE;	region = &chip->region.name.pmem;	strcpy(region->name, "CS46xx_BA1_pmem");	region->base = chip->ba1_addr + BA1_SP_PMEM;	region->size = CS46XX_BA1_PRG_SIZE;	region = &chip->region.name.reg;	strcpy(region->name, "CS46xx_BA1_reg");	region->base = chip->ba1_addr + BA1_SP_REG;	region->size = CS46XX_BA1_REG_SIZE;	/* set up amp and clkrun hack */	pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &ss_vendor);	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &ss_card);	for (cp = &cards[0]; cp->name; cp++) {		if (cp->vendor == ss_vendor && cp->id == ss_card) {			snd_printdd ("hack for %s enabled\n", cp->name);			chip->amplifier_ctrl = cp->amp;			chip->active_ctrl = cp->active;			chip->mixer_init = cp->mixer_init;			if (cp->init)				cp->init(chip);			break;		}	}	if (external_amp) {		snd_printk("Crystal EAPD support forced on.\n");		chip->amplifier_ctrl = amp_voyetra;	}	if (thinkpad) {		snd_printk("Activating CLKRUN hack for Thinkpad.\n");		chip->active_ctrl = clkrun_hack;		clkrun_init(chip);	}		if (chip->amplifier_ctrl == NULL)		chip->amplifier_ctrl = amp_none;	if (chip->active_ctrl == NULL)		chip->active_ctrl = amp_none;	chip->active_ctrl(chip, 1); /* enable CLKRUN */	pci_set_master(pci);	for (idx = 0; idx < 5; idx++) {		region = &chip->region.idx[idx];		if ((region->resource = request_mem_region(region->base, region->size, region->name)) == NULL) {			snd_printk("unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1);			snd_cs46xx_free(chip);			return -EBUSY;		}		region->remap_addr = ioremap_nocache(region->base, region->size);		if (region->remap_addr == NULL) {			snd_printk("%s ioremap problem\n", region->name);			snd_cs46xx_free(chip);			return -ENOMEM;		}	}	if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS46XX", (void *) chip)) {		snd_printk("unable to grab IRQ %d\n", pci->irq);		snd_cs46xx_free(chip);		return -EBUSY;	}	chip->irq = pci->irq;#ifdef CONFIG_SND_CS46XX_NEW_DSP	chip->dsp_spos_instance = cs46xx_dsp_spos_create(chip);	if (chip->dsp_spos_instance == NULL) {		snd_cs46xx_free(chip);		return -ENOMEM;	}#endif	err = snd_cs46xx_chip_init(chip);	if (err < 0) {		snd_cs46xx_free(chip);		return err;	}	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {		snd_cs46xx_free(chip);		return err;	}		snd_cs46xx_proc_init(card, chip);	snd_card_set_pm_callback(card, snd_cs46xx_suspend, snd_cs46xx_resume, chip);	chip->active_ctrl(chip, -1); /* disable CLKRUN */	snd_card_set_dev(card, &pci->dev);	*rchip = chip;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/99b359ba10a582148c6725f428a33ba5356dd993/cs46xx_lib.c/clean/sound/pci/cs46xx/cs46xx_lib.c