aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-03 10:52:51 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-11 11:26:56 -0400
commitacd14c181fc201a397aaff02af3b8c3f1dcf233f (patch)
tree1fbd97b1598eb8eeaa73750bb4f982f664476d5a /include/media
parentmedia: v4l2-ioctl: replace IOCTL_INFO_STD with stub functions (diff)
downloadlinux-dev-acd14c181fc201a397aaff02af3b8c3f1dcf233f.tar.xz
linux-dev-acd14c181fc201a397aaff02af3b8c3f1dcf233f.zip
media: v4l2-device.h: always expose mdev
The mdev field is only present if CONFIG_MEDIA_CONTROLLER is set. But since we will need to pass the media_device to vb2 and the control framework it is very convenient to just make this field available all the time. If CONFIG_MEDIA_CONTROLLER is not set, then it will just be NULL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-device.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index 0c9e4da55499..b330e4a08a6b 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-device.h
@@ -33,7 +33,7 @@ struct v4l2_ctrl_handler;
* struct v4l2_device - main struct to for V4L2 device drivers
*
* @dev: pointer to struct device.
- * @mdev: pointer to struct media_device
+ * @mdev: pointer to struct media_device, may be NULL.
* @subdevs: used to keep track of the registered subdevs
* @lock: lock this struct; can be used by the driver as well
* if this struct is embedded into a larger struct.
@@ -58,9 +58,7 @@ struct v4l2_ctrl_handler;
*/
struct v4l2_device {
struct device *dev;
-#if defined(CONFIG_MEDIA_CONTROLLER)
struct media_device *mdev;
-#endif
struct list_head subdevs;
spinlock_t lock;
char name[V4L2_DEVICE_NAME_SIZE];