Thread (18 messages) 18 messages, 5 authors, 2018-12-05

Re: [PATCH v3 6/9] media: v4l2-subdev: fix v4l2_subdev_get_try_* dependency

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2018-09-19 16:22:24
Also in: linux-media

Hi Marco,

On Tue, Sep 18, 2018 at 03:14:50PM +0200, Marco Felsch wrote:
quoted hunk ↗ jump to hunk
These helpers make us of the media-controller entity which is only
available if the CONFIG_MEDIA_CONTROLLER is enabled.

Signed-off-by: Marco Felsch <redacted>
---
Changelog:

v3:
- add CONFIG_MEDIA_CONTROLLER switch instead of moving the
  v4l2_subdev_get_try_* APIs into the existing one.

v2:
- Initial commit

 include/media/v4l2-subdev.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index ce48f1fcf295..d2479d5ebca8 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -912,6 +912,8 @@ struct v4l2_subdev_fh {
 #define to_v4l2_subdev_fh(fh)	\
 	container_of(fh, struct v4l2_subdev_fh, vfh)
 
+#ifdef CONFIG_MEDIA_CONTROLLER
VIDEO_V4L2_SUBDEV_API (used below) depends on MEDIA_CONTROLLER. Either this
or the previous patch would be meaningful but not both.

Considering a driver wouldn't use the functions below if it did not need or
could use VIDEO_V4L2_SUBDEV_API, I'd suggest retaining the other patch.
quoted hunk ↗ jump to hunk
+
 /**
  * v4l2_subdev_get_try_format - ancillary routine to call
  *	&struct v4l2_subdev_pad_config->try_fmt
@@ -978,6 +980,8 @@ static inline struct v4l2_rect
 #endif
 }
 
+#endif
+
 extern const struct v4l2_file_operations v4l2_subdev_fops;
 
 /**
-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help