diff mbox series

[v5,10/9] media: mt9v111: fix compilation when !VIDEO_V4L2_SUBDEV_API

Message ID 20210611054909.28155-1-tomi.valkeinen@ideasonboard.com
State New
Headers show
Series media: v4l2-subdev: add subdev-wide state struct | expand

Commit Message

Tomi Valkeinen June 11, 2021, 5:49 a.m. UTC
Patch "media: v4l2-subdev: add subdev-wide state struct" describes the
semantic patch used to convert drivers to the new subdev-wide state. For
some reason the semantic patch didn't catch a single case of:

	#if IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API)
		this was patched
	#else
		this was not patched
	#endif

Manually fix this one case.

Note that this patch is meant to be squashed into the main patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 drivers/media/i2c/mt9v111.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index b438f8c077d5..2dc4a0f24ce8 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -800,7 +800,7 @@  static struct v4l2_mbus_framefmt *__mt9v111_get_pad_format(
 #if IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API)
 		return v4l2_subdev_get_try_format(&mt9v111->sd, sd_state, pad);
 #else
-		return &cfg->try_fmt;
+		return &sd_state->pads->try_fmt;
 #endif
 	case V4L2_SUBDEV_FORMAT_ACTIVE:
 		return &mt9v111->fmt;