static int snd_cs4231_open(cs4231_t *chip, unsigned int mode){	unsigned long flags;	down(&chip->open_mutex);	if ((chip->mode & mode)) {		up(&chip->open_mutex);		return -EAGAIN;	}	if (chip->mode & CS4231_MODE_OPEN) {		chip->mode |= mode;		up(&chip->open_mutex);		return 0;	}	/* ok. now enable and ack CODEC IRQ */	spin_lock_irqsave(&chip->lock, flags);	snd_cs4231_out(chip, CS4231_IRQ_STATUS, CS4231_PLAYBACK_IRQ |		       CS4231_RECORD_IRQ |		       CS4231_TIMER_IRQ);	snd_cs4231_out(chip, CS4231_IRQ_STATUS, 0);	__cs4231_writeb(chip, 0, CS4231P(chip, STATUS));	/* clear IRQ */	__cs4231_writeb(chip, 0, CS4231P(chip, STATUS));	/* clear IRQ */	snd_cs4231_out(chip, CS4231_IRQ_STATUS, CS4231_PLAYBACK_IRQ |		       CS4231_RECORD_IRQ |		       CS4231_TIMER_IRQ);	snd_cs4231_out(chip, CS4231_IRQ_STATUS, 0);	spin_unlock_irqrestore(&chip->lock, flags);	chip->mode = mode;	up(&chip->open_mutex);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a131430c200f6bda313bf5d0a8e238c41afdfe0a/cs4231.c/clean/sound/sparc/cs4231.c