struct device_node *tas_node; 
struct device_node *tas_node, *np; 
int __init snd_pmac_tumbler_init(pmac_t *chip){	int i, err;	pmac_tumbler_t *mix;	u32 *paddr;	struct device_node *tas_node;	char *chipname;#ifdef CONFIG_KMOD	if (current->fs->root)		request_module("i2c-keywest");#endif /* CONFIG_KMOD */		mix = kmalloc(sizeof(*mix), GFP_KERNEL);	if (! mix)		return -ENOMEM;	memset(mix, 0, sizeof(*mix));	mix->headphone_irq = -1;	chip->mixer_data = mix;	chip->mixer_free = tumbler_cleanup;	if ((err = tumbler_init(chip)) < 0)		return err;	/* set up TAS */	tas_node = find_devices("deq");	if (tas_node == NULL)		tas_node = find_devices("codec");	if (tas_node == NULL)		return -ENODEV;	paddr = (u32 *)get_property(tas_node, "i2c-address", NULL);	if (paddr == NULL)		paddr = (u32 *)get_property(tas_node, "reg", NULL);	if (paddr)		mix->i2c.addr = (*paddr) >> 1;	else		mix->i2c.addr = TAS_I2C_ADDR;	if (chip->model == PMAC_TUMBLER) {		mix->i2c.init_client = tumbler_init_client;		mix->i2c.name = "TAS3001c";		chipname = "Tumbler";	} else {		mix->i2c.init_client = snapper_init_client;		mix->i2c.name = "TAS3004";		chipname = "Snapper";	}	if ((err = snd_pmac_keywest_init(&mix->i2c)) < 0)		return err;	/*	 * build mixers	 */	sprintf(chip->card->mixername, "PowerMac %s", chipname);	if (chip->model == PMAC_TUMBLER) {		for (i = 0; i < ARRAY_SIZE(tumbler_mixers); i++) {			if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&tumbler_mixers[i], chip))) < 0)				return err;		}	} else {		for (i = 0; i < ARRAY_SIZE(snapper_mixers); i++) {			if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snapper_mixers[i], chip))) < 0)				return err;		}	}	chip->master_sw_ctl = snd_ctl_new1(&tumbler_hp_sw, chip);	if ((err = snd_ctl_add(chip->card, chip->master_sw_ctl)) < 0)		return err;	chip->speaker_sw_ctl = snd_ctl_new1(&tumbler_speaker_sw, chip);	if ((err = snd_ctl_add(chip->card, chip->speaker_sw_ctl)) < 0)		return err;	chip->drc_sw_ctl = snd_ctl_new1(&tumbler_drc_sw, chip);	if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0)		return err;#ifdef CONFIG_PMAC_PBOOK	chip->resume = tumbler_resume;#endif	INIT_WORK(&device_change, device_change_handler, (void *)chip);#ifdef PMAC_SUPPORT_AUTOMUTE	if (mix->headphone_irq >=0 && (err = snd_pmac_add_automute(chip)) < 0)		return err;	chip->detect_headphone = tumbler_detect_headphone;	chip->update_automute = tumbler_update_automute;	tumbler_update_automute(chip, 0); /* update the status only */#endif	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b20af5f59797796d28b701f5d337e47c8a142eb2/tumbler.c/buggy/sound/ppc/tumbler.c