kernels/linux-2.4.0/drivers/media/video/videodev.c
/*
 *	We need to do MMAP support
 */
We need to do MMAP support
We need to do MMAP support
int video_mmap(struct file *file, struct vm_area_struct *vma)
{
	int ret = -EINVAL;
	struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)];
	if(vfl->mmap) {
		lock_kernel();
		ret = vfl->mmap(vfl, (char *)vma->vm_start, 
				(unsigned long)(vma->vm_end-vma->vm_start));
		unlock_kernel();
	}
	return ret;
}
int video_mmap ( struct file * file , struct vm_area_struct * vma ) { int ret = - EINVAL ; struct video_device * vfl = video_device [ MINOR ( file -> f_dentry -> d_inode -> i_rdev ) ] ; if ( vfl -> mmap ) { lock_kernel ( ) ; ret = vfl -> mmap ( vfl , ( char * ) vma -> vm_start , ( unsigned long ) ( vma -> vm_end - vma -> vm_start ) ) ; unlock_kernel ( ) ; } return ret ; }
We need to do MMAP support
We need to do MMAP support