Lines Matching refs:file
326 static int mixer_open(struct inode *inode, struct file *file) in mixer_open() argument
338 static int mixer_release(struct inode *inode, struct file *file) in mixer_release() argument
347 static int mixer_ioctl(struct file *file, u_int cmd, u_long arg) in mixer_ioctl() argument
371 static long mixer_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) in mixer_unlocked_ioctl() argument
376 ret = mixer_ioctl(file, cmd, arg); in mixer_unlocked_ioctl()
547 static ssize_t sq_write(struct file *file, const char __user *src, size_t uLeft, in sq_write() argument
673 static __poll_t sq_poll(struct file *file, struct poll_table_struct *wait) in sq_poll() argument
683 if (file->f_mode & FMODE_WRITE ) in sq_poll()
684 poll_wait(file, &write_sq.action_queue, wait); in sq_poll()
685 if (file->f_mode & FMODE_WRITE) in sq_poll()
701 static inline void sq_wake_up(struct sound_queue *sq, struct file *file,
704 if (file->f_mode & mode) {
711 static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode, in sq_open2() argument
716 if (file->f_mode & mode) { in sq_open2()
720 if (file->f_flags & O_NONBLOCK) in sq_open2()
742 sq_wake_up(sq, file, mode); in sq_open2()
749 sq->non_blocking = file->f_flags & O_NONBLOCK; in sq_open2()
756 #define write_sq_wake_up(file) sq_wake_up(&write_sq, file, FMODE_WRITE)
759 #define write_sq_open(file) \ argument
760 sq_open2(&write_sq, file, FMODE_WRITE, numWriteBufs, writeBufSize )
762 static int sq_open(struct inode *inode, struct file *file) in sq_open() argument
772 rc = write_sq_open(file); /* checks the f_mode */ in sq_open()
775 if (file->f_mode & FMODE_READ) { in sq_open()
782 dmasound.mach.sq_open(file->f_mode); in sq_open()
880 static int sq_release(struct inode *inode, struct file *file) in sq_release() argument
886 if (file->f_mode & FMODE_WRITE) { in sq_release()
895 if (file->f_mode & shared_resource_owner) { /* it's us that has them */ in sq_release()
911 read_sq_wake_up(file); /* checks f_mode */ in sq_release()
912 write_sq_wake_up(file); /* checks f_mode */ in sq_release()
989 static int sq_ioctl(struct file *file, u_int cmd, u_long arg) in sq_ioctl() argument
1016 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1038 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1043 if (file->f_mode & shared_resource_owner) in sq_ioctl()
1056 if (shared_resources_are_mine(file->f_mode)) { in sq_ioctl()
1070 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1079 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1089 if (shared_resources_are_mine(file->f_mode) && in sq_ioctl()
1116 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1129 if (file->f_mode & FMODE_WRITE) { in sq_ioctl()
1147 return mixer_ioctl(file, cmd, arg); in sq_ioctl()
1152 static long sq_unlocked_ioctl(struct file *file, u_int cmd, u_long arg) in sq_unlocked_ioctl() argument
1157 ret = sq_ioctl(file, cmd, arg); in sq_unlocked_ioctl()
1266 static int state_open(struct inode *inode, struct file *file) in state_open() argument
1348 static int state_release(struct inode *inode, struct file *file) in state_release() argument
1357 static ssize_t state_read(struct file *file, char __user *buf, size_t count, in state_read() argument