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>
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 = {};
* * %-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