Commit 2984a99f authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: v4l: common: Fix naming of v4l2_get_link_rate

Rename v4l2_get_link_rate() as v4l2_get_link_freq(). What the function
returns is the frequency of the link; rename it to reflect the name of the
control where the information is obtained.

Fixes: 1b888b3c ("media: v4l: Add a helper for obtaining the link frequency")
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e99a8f0f
...@@ -302,7 +302,7 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, struct cio2_queue *q, ...@@ -302,7 +302,7 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, struct cio2_queue *q,
if (!q->sensor) if (!q->sensor)
return -ENODEV; return -ENODEV;
freq = v4l2_get_link_rate(q->sensor->ctrl_handler, bpp, lanes); freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes);
if (freq < 0) { if (freq < 0) {
dev_err(dev, "error %lld, invalid link_freq\n", freq); dev_err(dev, "error %lld, invalid link_freq\n", freq);
return freq; return freq;
......
...@@ -442,7 +442,7 @@ int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat, ...@@ -442,7 +442,7 @@ int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
} }
EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt); EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt);
s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul, s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
unsigned int div) unsigned int div)
{ {
struct v4l2_ctrl *ctrl; struct v4l2_ctrl *ctrl;
...@@ -473,4 +473,4 @@ s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul, ...@@ -473,4 +473,4 @@ s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul,
return freq > 0 ? freq : -EINVAL; return freq > 0 ? freq : -EINVAL;
} }
EXPORT_SYMBOL_GPL(v4l2_get_link_rate); EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
...@@ -520,7 +520,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat, ...@@ -520,7 +520,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
u32 width, u32 height); u32 width, u32 height);
/** /**
* v4l2_get_link_rate - Get link rate from transmitter * v4l2_get_link_freq - Get link rate from transmitter
* *
* @handler: The transmitter's control handler * @handler: The transmitter's control handler
* @mul: The multiplier between pixel rate and link frequency. Bits per pixel on * @mul: The multiplier between pixel rate and link frequency. Bits per pixel on
...@@ -537,7 +537,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat, ...@@ -537,7 +537,7 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
* -ENOENT: Link frequency or pixel rate control not found * -ENOENT: Link frequency or pixel rate control not found
* -EINVAL: Invalid link frequency value * -EINVAL: Invalid link frequency value
*/ */
s64 v4l2_get_link_rate(struct v4l2_ctrl_handler *handler, unsigned int mul, s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul,
unsigned int div); unsigned int div);
static inline u64 v4l2_buffer_get_timestamp(const struct v4l2_buffer *buf) static inline u64 v4l2_buffer_get_timestamp(const struct v4l2_buffer *buf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment