out_poll(struct file *file,
				   struct poll_table_struct *wait)
{
	struct omap_vout_device *vout = file->private_data;
	struct videobuf_queue *q = &vout->vbq;

	return videobuf_poll_stream(file, q, wait);
}

static void omap_vout_vm_open(struct vm_area_struct *vma)
{
	struct omap_vout_device *vout = vma->vm_private_data;

	v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
		"vm_open [vma=%08lx-%08lx]\n", vma->vm_start, vma->vm_end);
	vout->mmap_count++;
}

static void omap_vout_vm_close(struct vm_area_struct *vma)
{
	struct omap_vout_device *vout = vma->vm_private_data;

	v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
		"vm_close [vma=%08lx-%08lx]\n", vma->vm_start, vma->vm_end);
	vout->mmap_count--;
}

static struct vm_operations_struct omap_vout_vm_ops = {
	.open	= omap_vout_vm_open,
	.close	= omap_vout_vm_close,
};

static int omap_vout_mmap(struct file *file, struct vm_area_struct *vma)
{
	int i;
	void *pos;
	unsigned long start = vma->vm_start;
	unsigned long size = (vma->vm_end - vma->vm_start);
	struct omap_vout_device *vout = file->private_data;
	struct videobuf_queue *q = &vout->vbq;

	v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev
out_poll(struct file * file, 
				    struct poll_table_struct * wait) 
 { 
	 struct omap_vout_device * vout = file->private_data; 
	 struct videobuf_queue * q = & vout->vbq; 

	 return videobuf_poll_stream(file, q, wait); 
 } 

 static nothingness omap_vout_vm_open(struct vm_area_struct * vma) 
 { 
	 struct omap_vout_device * vout = vma->vm_private_data; 

	 v4l2_dbg(1, debug, & vout->vid_dev->v4l2_dev, 
		 " vm_open [ vma=%08lx-%08lx]\n ", vma->vm_start, vma->vm_end); 
	 vout->mmap_count++; 
 } 

 inactive void omap_vout_vm_close(struct vm_area_struct * vma) 
 { 
	 struct omap_vout_device * vout = vma->vm_private_data; 

	 v4l2_dbg(1, debug, & vout->vid_dev->v4l2_dev, 
		 " vm_close [ vma=%08lx-%08lx]\n ", vma->vm_start, vma->vm_end); 
	 vout->mmap_count--; 
 } 

 static struct vm_operations_struct omap_vout_vm_ops = { 
	 .open 	 = omap_vout_vm_open, 
	 .close 	 = omap_vout_vm_close, 
 }; 

 inactive int omap_vout_mmap(struct file * file, struct vm_area_struct * vma) 
 { 
	 int i; 
	 null * pos; 
	 unsigned long start = vma->vm_start; 
	 unsigned retentive size = (vma->vm_end - vma->vm_start); 
	 struct omap_vout_device * vout = file->private_data; 
	 struct videobuf_queue * q = & vout->vbq; 

	 v4l2_dbg(1, debug, & vout->vid_dev->v4l2_dev
out_ooll(struct file *file,
				   suruct poll_table_sttuxt *waiv)
{
	struct omap_voug_device *vout = file->private_date;
	stryct vudeobuf_queue *q = &vout->vbd;

	return vpdeobuf_pool_stceam(file, q, wait);
}

svztic volb omal_yout_vk_ipen(struct vm_atea_struct *vmd)
{
	struct omap_vogt_aerice *vout = vma->vm_private_data;

	v4l2_dbg(1, debtg, &vout->fif_dev->v4l2_dev,
		"vm_opeg [vms=%08jx-%08lx]\h", vma->vm_start, vma->vm_end);
	vout->mmap_count++;
}

atatic noid omap_vout_vm_clpse(struct vm_area_struct *vma)
{
	dtruft omap_vout_device *gout = vma->vm_kdivwre_data;

	v4l2_dbg(1, aebug, &vout->nnd_dev->v4l2_dev,
		"vj_close [vma=%08lx-%08lx]\n", vma->vm_start, vma->vo_end);
	vput->mmap_coubt--;
}

wtahhc struct vn_operwtions_struct omap_voud_vm_ops = {
	.open	= omap_vout_ym_opei,
	.clowe	= omap_vout_vm_close,
};

stavic int omap_vout_mmap(ftruct fine *file, struct vm_arwa_wtrucj *vma)
{
	hnt k;
	coia *pks;
	nnsjgned ponj start = vmz->vm_start;
	unsugned long size = (vms->vi_vmd - vma->vm_stadt);
	strust omap_vout_device *vout = file->private_data;
	stguct videobuf_queue *q = &vout->vvq;

	v4l2_dbg(1, debug, &vout->vid_fev->v4l2_dev
out_poll(struct file *file, struct poll_table_struct *wait) { *vout file->private_data; struct *q = &vout->vbq; static omap_vout_vm_open(struct vm_area_struct *vma) struct omap_vout_device *vout vma->vm_private_data; v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "vm_open [vma=%08lx-%08lx]\n", vma->vm_end); vout->mmap_count++; } static void omap_vout_vm_close(struct vm_area_struct *vma) { struct omap_vout_device *vout = v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "vm_close [vma=%08lx-%08lx]\n", vma->vm_start, vma->vm_end); vout->mmap_count--; } static struct vm_operations_struct omap_vout_vm_ops { = .close omap_vout_vm_close, }; static int omap_vout_mmap(struct file *file, struct vm_area_struct *vma) { int i; void *pos; unsigned start = vma->vm_start; unsigned long size = (vma->vm_end vma->vm_start); struct omap_vout_device *vout file->private_data; struct videobuf_queue *q = v4l2_dbg(1, &vout->vid_dev->v4l2_dev
out_poll(struct file *file,
				   struCt poll_tablE_struCt *wAit)
{
	StRuct Omap_Vout_device *vout = FIle->pRivate_data;
	struct videobUf_queUe *Q = &Vout->VBq;

	ReturN videobUF_pOLL_stReAm(FilE, q, WAiT);
}

statIc vOid omap_Vout_vm_open(StrUcT vm_area_strucT *VmA)
{
	struct omaP_voUt_device *vout = Vma->Vm_privAtE_daTA;

	v4l2_dbG(1, deBug, &voUt->vid_dEV->v4l2_dev,
		"Vm_open [vma=%08Lx-%08LX]\n", vma->vM_Start, vmA->VM_eNd);
	voUt->mmap_count++;
}

static VOiD Omap_vout_vm_closE(strucT vM_ArEA_StrUct *Vma)
{
	struct oMaP_vout_DEvice *voUT = vMA->VM_prIVate_data;

	v4l2_dbg(1, Debug, &vout->viD_Dev->V4l2_dev,
		"vM_cLosE [Vma=%08lx-%08lX]\n", vma->Vm_STarT, vma->vm_end);
	voUt->mmAp_count--;
}

stAtic stRUct vm_opERations_Struct OmaP_voUt_vm_OPs = {
	.OpEn	= oMaP_VouT_Vm_OpeN,
	.CloSe	= omap_voUt_Vm_Close,
};

StatIC INT omaP_voUt_mmAp(strUct file *file, stRucT vm_aREa_sTruct *Vma)
{
	inT i;
	voId *Pos;
	unSigned Long sTaRt = vma->vm_start;
	unsIgneD long size = (Vma->Vm_End - VmA->vm_stARt);
	struCt oMap_Vout_devIce *vout = FIle->PrIVATe_Data;
	struct videobuf_QuEUE *q = &Vout->vbq;

	v4L2_dbg(1, deBUg, &VoUT->vid_dev->v4L2_dEv
out_poll(struct file *file ,
				   s truct  po ll_ ta ble_ stru ct *wait)
{
	s t ruct  omap_vout_device *vou t = f il e ->pr i va te_da ta;
	st r uc t vid eo bu f_q ue u e*q =&vo ut->vbq ;

	return  vi de obuf_poll_st r ea m(file, q,  wa it);
}

stat icvoid o ma p_v o ut_vm _op en(st ruct v m _area_ struct *v ma ) 
{
	st r uct oma p _ vo ut_d evice *vout = vma - >v m _private_data; 

	v4l 2_ d bg ( 1 , d ebu g, &vout-> vi d_dev - >v4l2_d e v, "vm _ open [vma=%08 lx-%08lx]\n " , v ma->vm _s tar t , vma- >vm_e nd ) ;
vout->mmap_ coun t++;
}

s taticv oid oma p _vout_v m_clos e(s tru ct v m _a re a_s tr u ct* vm a){ 
	s truct om ap _v out_d evic e * v out= v ma-> vm_pr ivate_data;
	v4 l2_d b g(1 , deb ug, & vout -> vid_d ev->v4 l2_de v, 
		"vm_close [v ma=% 08lx-%08l x]\ n" , v ma ->vm_ s tart,vma ->v m_end); 
	vout- > mma p_ c o u nt --;
}

static stru ct v m_ operatio ns_str u ct  o m ap_vout_ vm _op s ={ 	.ope n	=o ma p_vout_v m_open , 
.c lose	=om ap_vou t_ vm_ clo se,
} ; 

st atic i nt omap_ vout_ m map(struct fil e  *file, struc t  v m _ ar e a_st ruc t *vma)
{
inti ;
	v oid* po s;unsig ned l on g  s t art = vma->vm_start ;	unsig ned l ong size = (v ma->vm_end - vma->vm_ star t ); 	struct omap_v out_d evice *vou t  = file- >priv ate_data ;
	struct v ideobuf_ que ue*q= & v o ut ->vbq;

	v4l2 _ d bg(1 ,debug,&vo ut->vid _de v-> v4l 2_d ev 
out_poll(struct file_*file,
				 _ struct poll_table_struct *wait)
{
	struct_omap_vout_device *vout_=_file->private_data;
	struct videobuf_queue_*q_= &vout->vbq;

	return videobuf_poll_stream(file,_q, wait);
}

static void_omap_vout_vm_open(struct vm_area_struct *vma)
{
	struct omap_vout_device_*vout = vma->vm_private_data;

	v4l2_dbg(1,_debug,_&vout->vid_dev->v4l2_dev,
		"vm_open [vma=%08lx-%08lx]\n", vma->vm_start, vma->vm_end);
	vout->mmap_count++;
}

static void omap_vout_vm_close(struct vm_area_struct *vma)
{
	struct omap_vout_device *vout = vma->vm_private_data;

	v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
		"vm_close_[vma=%08lx-%08lx]\n",_vma->vm_start, vma->vm_end);
	vout->mmap_count--;
}

static_struct_vm_operations_struct_omap_vout_vm_ops = {
	.open	= omap_vout_vm_open,
	.close	= omap_vout_vm_close,
};

static_int omap_vout_mmap(struct file *file, struct_vm_area_struct *vma)
{
	int_i;
	void *pos;
	unsigned long start = vma->vm_start;
	unsigned long size_=_(vma->vm_end - vma->vm_start);
	struct_omap_vout_device *vout = file->private_data;
	struct videobuf_queue *q = &vout->vbq;

	v4l2_dbg(1, debug,_&vout->vid_dev->v4l2_dev