Skip to content

Commit 5a0abb8

Browse files
Niklas Söderlundhverkuil
authored andcommitted
media: v4l2-common: Reduce warnings about missing V4L2_CID_LINK_FREQ control
When operating a pipeline with a missing V4L2_CID_LINK_FREQ control this two line warning is printed each time the pipeline is started. Reduce this excessive logging by only warning once for the missing control. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
1 parent 72aa1c5 commit 5a0abb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/media/v4l2-core/v4l2-common.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,10 @@ s64 __v4l2_get_link_freq_ctrl(struct v4l2_ctrl_handler *handler,
505505

506506
freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div);
507507

508-
pr_warn("%s: Link frequency estimated using pixel rate: result might be inaccurate\n",
509-
__func__);
510-
pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n",
511-
__func__);
508+
pr_warn_once("%s: Link frequency estimated using pixel rate: result might be inaccurate\n",
509+
__func__);
510+
pr_warn_once("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n",
511+
__func__);
512512
}
513513

514514
return freq > 0 ? freq : -EINVAL;

0 commit comments

Comments
 (0)