[PATCH yavta 7/7] Remove unneeded conditional compilation for old V4L2 API versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we include a copy of the V4L2 kernel headers, there's no need for
conditional compilation to support old versions of the API.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 yavta.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/yavta.c b/yavta.c
index 2d49131a4271..741df82a8db0 100644
--- a/yavta.c
+++ b/yavta.c
@@ -40,10 +40,6 @@
 
 #include <linux/videodev2.h>
 
-#ifndef V4L2_BUF_FLAG_ERROR
-#define V4L2_BUF_FLAG_ERROR	0x0040
-#endif
-
 #define ARRAY_SIZE(a)	(sizeof(a)/sizeof((a)[0]))
 
 enum buffer_fill_mode
@@ -1142,16 +1138,9 @@ static int video_for_each_control(struct device *dev,
 	unsigned int id;
 	int ret;
 
-#ifndef V4L2_CTRL_FLAG_NEXT_CTRL
-	unsigned int i;
-
-	for (i = V4L2_CID_BASE; i <= V4L2_CID_LASTP1; ++i) {
-		id = i;
-#else
 	id = 0;
 	while (1) {
 		id |= V4L2_CTRL_FLAG_NEXT_CTRL | V4L2_CTRL_FLAG_NEXT_COMPOUND;
-#endif
 
 		ret = query_control(dev, id, &query);
 		if (ret == -EINVAL)
-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux