Skip to contentSkip to conversation

videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT

PATCH New Hans Verkuil 1 participant 1 message Jun 15, 2015 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT

The colorspace argument was compared against a V4L2_XFER_FUNC define instead of against a V4L2_COLORSPACE define, returning the wrong answer.

include/uapi/linux/videodev2.h +1 -1
index 3d5fc72..3228fbe 100644
@@ -270,7 +270,7 @@ enum v4l2_xfer_func {
  * This depends on the colorspace.
  */
 #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \
-	((colsp) == V4L2_XFER_FUNC_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \
+	((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \
 	 ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \
 	  ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \
 	   ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \