[media] v4l2-dev: add new VFL_DIR_ defines
These will be used by v4l2-dev.c to improve ioctl checking. I.e. ioctls for capture should return -ENOTTY when called for an output device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
		
					parent
					
						
							
								4f996594ce
							
						
					
				
			
			
				commit
				
					
						5c77879ff9
					
				
			
		
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -26,6 +26,12 @@ | ||||||
| #define VFL_TYPE_SUBDEV		3 | #define VFL_TYPE_SUBDEV		3 | ||||||
| #define VFL_TYPE_MAX		4 | #define VFL_TYPE_MAX		4 | ||||||
| 
 | 
 | ||||||
|  | /* Is this a receiver, transmitter or mem-to-mem? */ | ||||||
|  | /* Ignored for VFL_TYPE_SUBDEV. */ | ||||||
|  | #define VFL_DIR_RX		0 | ||||||
|  | #define VFL_DIR_TX		1 | ||||||
|  | #define VFL_DIR_M2M		2 | ||||||
|  | 
 | ||||||
| struct v4l2_ioctl_callbacks; | struct v4l2_ioctl_callbacks; | ||||||
| struct video_device; | struct video_device; | ||||||
| struct v4l2_device; | struct v4l2_device; | ||||||
|  | @ -105,7 +111,8 @@ struct video_device | ||||||
| 
 | 
 | ||||||
| 	/* device info */ | 	/* device info */ | ||||||
| 	char name[32]; | 	char name[32]; | ||||||
| 	int vfl_type; | 	int vfl_type;	/* device type */ | ||||||
|  | 	int vfl_dir;	/* receiver, transmitter or m2m */ | ||||||
| 	/* 'minor' is set to -1 if the registration failed */ | 	/* 'minor' is set to -1 if the registration failed */ | ||||||
| 	int minor; | 	int minor; | ||||||
| 	u16 num; | 	u16 num; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hans Verkuil
				Hans Verkuil