aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/media-device.c
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2018-02-27 07:24:09 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-25 07:42:53 -0400
commit30b914c8d825da7d4c651ade34667cef05e3ee27 (patch)
treeca326f568e4ebc8b4b90649a3949b91ee4e45901 /drivers/media/media-device.c
parentmedia: cec-gpio: support 5v testing (diff)
downloadlinux-dev-30b914c8d825da7d4c651ade34667cef05e3ee27.tar.xz
linux-dev-30b914c8d825da7d4c651ade34667cef05e3ee27.zip
media: add 'index' to struct media_v2_pad
The v2 pad structure never exposed the pad index, which made it impossible to call the MEDIA_IOC_SETUP_LINK ioctl, which needs that information. It is really trivial to just expose this information, so implement this. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r--drivers/media/media-device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 47bb2254fbfd..047d38372a27 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -331,6 +331,7 @@ static long media_device_get_topology(struct media_device *mdev, void *arg)
kpad.id = pad->graph_obj.id;
kpad.entity_id = pad->entity->graph_obj.id;
kpad.flags = pad->flags;
+ kpad.index = pad->index;
if (copy_to_user(upad, &kpad, sizeof(kpad)))
ret = -EFAULT;