kernels/linux-2.4.0/drivers/sound/ymfpci.c
/*
 * Mixer operations are based on cs46xx.
 */
Mixer operations are based on cs46xx.
Mixer operations are based on cs46xx .
static int ymf_open_mixdev(struct inode *inode, struct file *file)
{
	int i;
	int minor = MINOR(inode->i_rdev);
	struct list_head *list;
	ymfpci_t *unit;
	for (list = ymf_devs.next; list != &ymf_devs; list = list->next) {
		unit = list_entry(list, ymfpci_t, ymf_devs);
		for (i = 0; i < NR_AC97; i++) {
			if (unit->ac97_codec[i] != NULL &&
			    unit->ac97_codec[i]->dev_mixer == minor) {
				goto match;
			}
		}
	}
	return -ENODEV;
 match:
	file->private_data = unit->ac97_codec[i];
	MOD_INC_USE_COUNT;
	return 0;
}
static int ymf_open_mixdev ( struct inode * inode , struct file * file ) { int i ; int minor = MINOR ( inode -> i_rdev ) ; struct list_head * list ; ymfpci_t * unit ; for ( list = ymf_devs . next ; list != & ymf_devs ; list = list -> next ) { unit = list_entry ( list , ymfpci_t , ymf_devs ) ; for ( i = 0 ; i < NR_AC97 ; i ++ ) { if ( unit -> ac97_codec [ i ] != NULL && unit -> ac97_codec [ i ] -> dev_mixer == minor ) { goto match ; } } } return - ENODEV ; match : file -> private_data = unit -> ac97_codec [ i ] ; MOD_INC_USE_COUNT ; return 0 ; }
Mixer operations are based on cs46xx.
Mixer operations are based on cs46xx .