V4L2_STD_PAL, V4L2_STD_SECAM, and V4L2_STD_NTSC are not the only composite standards. Currently, e.g., if a driver supports all of V4L2_STD_PAL_B, V4L2_STD_PAL_B1 and V4L2_STD_PAL_G, the enumeration will report V4L2_STD_PAL_BG and not the single standards, which can confuse applications. Fix this by only clearing simple standards from the mask. This, of course, will only work, if composite standards are listed before simple ones in the standards array in v4l2-ioctl.c, which is currently the case. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx> --- diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 4b11257..2389df0 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c @@ -1065,9 +1065,7 @@ static long __video_do_ioctl(struct file *file, j++; if (curr_id == 0) break; - if (curr_id != V4L2_STD_PAL && - curr_id != V4L2_STD_SECAM && - curr_id != V4L2_STD_NTSC) + if (is_power_of_2(curr_id)) id &= ~curr_id; } if (i <= index) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html