summaryrefslogtreecommitdiffstats
path: root/include/media/media-device.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-23 12:51:22 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 15:18:53 +0100
commitcf975a4b40ec9a947dae614b23128f3984a2d324 (patch)
treea9103965b4889a823ee172ec21607b60610f461d /include/media/media-device.h
parent[media] uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctl (diff)
downloadlinux-cf975a4b40ec9a947dae614b23128f3984a2d324.tar.xz
linux-cf975a4b40ec9a947dae614b23128f3984a2d324.zip
[media] media: Use a macro to interate between all interfaces
Just like we do with entities, use a similar macro for the interfaces loop. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--include/media/media-device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 51807efa505b..f23d686aaac6 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -113,6 +113,11 @@ struct media_device *media_device_find_devres(struct device *dev);
#define media_device_for_each_entity(entity, mdev) \
list_for_each_entry(entity, &(mdev)->entities, list)
+/* Iterate over all interfaces. */
+#define media_device_for_each_intf(intf, mdev) \
+ list_for_each_entry(intf, &(mdev)->interfaces, list)
+
+
#else
static inline int media_device_register(struct media_device *mdev)
{