diff mbox series

[v2,10/10] media: rcar-vin: Support state-aware transmitters

Message ID 20220316154641.511667-11-jacopo+renesas@jmondi.org
State New
Headers show
Series media: Multiplexed streams for R-Car CSI-2 and ADV748x | expand

Commit Message

Jacopo Mondi March 16, 2022, 3:46 p.m. UTC
The VIN driver calls get_fmt() on the remove subdev to validate its
format. Now that the R-Car CSI-2 driver are moved to be state-aware
subdevices they need their active state when calling operations.

Use the newly introduced v4l2_subdev_call_state_active() from
v4l2-subdev-legacy.h.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/media/platform/rcar-vin/rcar-dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
index e08d4ca28725..68c192ea7cb5 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -14,6 +14,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/pm_runtime.h>
 
+#include <media/v4l2-subdev-legacy.h>
 #include <media/videobuf2-dma-contig.h>
 
 #include "rcar-vin.h"
@@ -1140,7 +1141,7 @@  static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
 	};
 
 	fmt.pad = pad->index;
-	if (v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt))
+	if (v4l2_subdev_call_state_active(sd, pad, get_fmt, &fmt))
 		return -EPIPE;
 
 	switch (fmt.format.code) {