From dc537756e1a00d2a2d08cbfb70d937fbd0121c83 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 20 Feb 2019 14:48:04 +0200 Subject: Remove unneeded conditional compilation for old V4L2 API versions 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 --- yavta.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/yavta.c b/yavta.c index 2d49131..741df82 100644 --- a/yavta.c +++ b/yavta.c @@ -40,10 +40,6 @@ #include -#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) -- cgit v1.2.3