aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
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 /include/uapi/linux
parent76e464888b1c367fddaf67f23ee3e0aa4ca8cef4 (diff)
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 'include/uapi/linux')
-rw-r--r--include/uapi/linux/media.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 86c7dcc9cba3..f6338bd57929 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -305,11 +305,21 @@ struct media_v2_interface {
305 }; 305 };
306} __attribute__ ((packed)); 306} __attribute__ ((packed));
307 307
308/*
309 * Appeared in 4.19.0.
310 *
311 * The media_version argument comes from the media_version field in
312 * struct media_device_info.
313 */
314#define MEDIA_V2_PAD_HAS_INDEX(media_version) \
315 ((media_version) >= ((4 << 16) | (19 << 8) | 0))
316
308struct media_v2_pad { 317struct media_v2_pad {
309 __u32 id; 318 __u32 id;
310 __u32 entity_id; 319 __u32 entity_id;
311 __u32 flags; 320 __u32 flags;
312 __u32 reserved[5]; 321 __u32 index;
322 __u32 reserved[4];
313} __attribute__ ((packed)); 323} __attribute__ ((packed));
314 324
315struct media_v2_link { 325struct media_v2_link {