[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>
This commit is contained in:
Mauro Carvalho Chehab
2015-08-23 07:51:22 -03:00
parent c398bb6441
commit cf975a4b40
2 changed files with 7 additions and 1 deletions

View File

@@ -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)
{