mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
media: imx-mipi-csis: Simplify access to source pad
The mipi_csis_calculate_params() function needs to access the pad of the connected source. The pad is already available in csis->source.pad, but the function takes a convoluted path by getting the pad index and indexing the source subdev's pads array. Simplify it. No functional change is intended. Link: https://lore.kernel.org/r/20250822002734.23516-3-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
6234d0df23
commit
0b6b9a0f68
|
|
@ -579,13 +579,11 @@ static void __mipi_csis_set_format(struct mipi_csis_device *csis,
|
|||
static int mipi_csis_calculate_params(struct mipi_csis_device *csis,
|
||||
const struct csis_pix_format *csis_fmt)
|
||||
{
|
||||
struct media_pad *src_pad =
|
||||
&csis->source.sd->entity.pads[csis->source.pad->index];
|
||||
s64 link_freq;
|
||||
u32 lane_rate;
|
||||
|
||||
/* Calculate the line rate from the pixel rate. */
|
||||
link_freq = v4l2_get_link_freq(src_pad, csis_fmt->width,
|
||||
link_freq = v4l2_get_link_freq(csis->source.pad, csis_fmt->width,
|
||||
csis->bus.num_data_lanes * 2);
|
||||
if (link_freq < 0) {
|
||||
dev_err(csis->dev, "Unable to obtain link frequency: %d\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user