media: v4l2-common: Constify media_pad argument to v4l2_get_link_freq()

The v4l2_get_link_freq() macro doesn't modify the pad argument. Make it
possible to call it with a const media_pad pointer.

Link: https://lore.kernel.org/r/20250822002734.23516-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Laurent Pinchart 2025-08-22 03:27:21 +03:00 committed by Hans Verkuil
parent 0750649b52
commit 6234d0df23
2 changed files with 2 additions and 2 deletions

View file

@ -550,7 +550,7 @@ static s64 v4l2_get_link_freq_ctrl(struct v4l2_ctrl_handler *handler,
return freq > 0 ? freq : -EINVAL;
}
s64 v4l2_get_link_freq(struct media_pad *pad, unsigned int mul,
s64 v4l2_get_link_freq(const struct media_pad *pad, unsigned int mul,
unsigned int div)
{
struct v4l2_mbus_config mbus_config = {};

View file

@ -579,7 +579,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
* * %-EINVAL: Invalid link frequency value
*/
#ifdef CONFIG_MEDIA_CONTROLLER
s64 v4l2_get_link_freq(struct media_pad *pad, unsigned int mul,
s64 v4l2_get_link_freq(const struct media_pad *pad, unsigned int mul,
unsigned int div);
#endif