struct media_file_operations — Media device file operations
struct media_file_operations { struct module * owner; ssize_t (* read) (struct file *, char __user *, size_t, loff_t *); ssize_t (* write) (struct file *, const char __user *, size_t, loff_t *); unsigned int (* poll) (struct file *, struct poll_table_struct *); long (* ioctl) (struct file *, unsigned int, unsigned long); long (* compat_ioctl) (struct file *, unsigned int, unsigned long); int (* open) (struct file *); int (* release) (struct file *); };
should be filled with THIS_MODULE
pointer to the function that implements read
syscall
pointer to the function that implements write
syscall
pointer to the function that implements poll
syscall
pointer to the function that implements ioctl
syscall
pointer to the function that will handle 32 bits userspace
calls to the the ioctl
syscall on a Kernel compiled with 64 bits.
pointer to the function that implements open
syscall
pointer to the function that will release the resources allocated
by the open
function.