Lines Matching refs:file
325 static int mixer_open(struct inode *inode, struct file *file) in mixer_open() argument
337 static int mixer_release(struct inode *inode, struct file *file) in mixer_release() argument
346 static int mixer_ioctl(struct file *file, u_int cmd, u_long arg) in mixer_ioctl() argument
370 static long mixer_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) in mixer_unlocked_ioctl() argument
375 ret = mixer_ioctl(file, cmd, arg); in mixer_unlocked_ioctl()
546 static ssize_t sq_write(struct file *file, const char __user *src, size_t uLeft, in sq_write() argument
672 static unsigned int sq_poll(struct file *file, struct poll_table_struct *wait) in sq_poll() argument
682 if (file->f_mode & FMODE_WRITE ) in sq_poll()
683 poll_wait(file, &write_sq.action_queue, wait); in sq_poll()
684 if (file->f_mode & FMODE_WRITE) in sq_poll()
700 static inline void sq_wake_up(struct sound_queue *sq, struct file *file,
703 if (file->f_mode & mode) {
710 static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode, in sq_open2() argument
715 if (file->f_mode & mode) { in sq_open2()
719 if (file->f_flags & O_NONBLOCK) in sq_open2()
741 sq_wake_up(sq, file, mode); in sq_open2()
748 sq->non_blocking = file->f_flags & O_NONBLOCK; in sq_open2()
755 #define write_sq_wake_up(file) sq_wake_up(&write_sq, file, FMODE_WRITE)
758 #define write_sq_open(file) \ argument
759 sq_open2(&write_sq, file, FMODE_WRITE, numWriteBufs, writeBufSize )
761 static int sq_open(struct inode *inode, struct file *file) in sq_open() argument
771 rc = write_sq_open(file); /* checks the f_mode */ in sq_open()
774 if (file->f_mode & FMODE_READ) { in sq_open()
781 dmasound.mach.sq_open(file->f_mode); in sq_open()
879 static int sq_release(struct inode *inode, struct file *file) in sq_release() argument
885 if (file->f_mode & FMODE_WRITE) { in sq_release()
894 if (file->f_mode & shared_resource_owner) { /* it's us that has them */ in sq_release()
910 read_sq_wake_up(file); /* checks f_mode */ in sq_release()
911 write_sq_wake_up(file); /* checks f_mode */ in sq_release()
988 static int sq_ioctl(struct file *file, u_int cmd, u_long arg) in sq_ioctl() argument
1015 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1037 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1042 if (file->f_mode & shared_resource_owner) in sq_ioctl()
1055 if (shared_resources_are_mine(file->f_mode)) { in sq_ioctl()
1069 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1078 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1088 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1115 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1128 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1146 return mixer_ioctl(file, cmd, arg); in sq_ioctl()
1151 static long sq_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) in sq_unlocked_ioctl() argument
1156 ret = sq_ioctl(file, cmd, arg); in sq_unlocked_ioctl()
1265 static int state_open(struct inode *inode, struct file *file) in state_open() argument
1347 static int state_release(struct inode *inode, struct file *file) in state_release() argument
1356 static ssize_t state_read(struct file *file, char __user *buf, size_t count, in state_read() argument