diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-07 22:12:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:18:50 -0200 |
commit | 3efdf62c5f68007020ef935ad2887e7fc4e31c36 (patch) | |
tree | 47bf2d5d7748ce0efb81548cbe20b4b2e3cfb329 /drivers/staging/media/omap4iss/iss_video.c | |
parent | [media] media: add macros to check if subdev or V4L2 DMA (diff) | |
download | linux-dev-3efdf62c5f68007020ef935ad2887e7fc4e31c36.tar.xz linux-dev-3efdf62c5f68007020ef935ad2887e7fc4e31c36.zip |
[media] media: use macros to check for V4L2 subdev entities
Instead of relying on media subtype, use the new macros to detect
if an entity is a subdev or an A/V DMA entity.
Please note that most drivers assume that there's just AV_DMA or
V4L2 subdevs. This is not true anymore, as we've added MC support
for DVB, and there are plans to add support for ALSA and FB/DRM
too.
Ok, on the current pipelines supported by those drivers, just V4L
stuff are there, but, assuming that some day a pipeline that also
works with other subsystems will ever added, it is better to add
explicit checks for the AV_DMA stuff.
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_video.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index ea384630aab0..60b7a58e6122 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -190,8 +190,7 @@ iss_video_remote_subdev(struct iss_video *video, u32 *pad) remote = media_entity_remote_pad(&video->pad); - if (!remote || - media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) + if (!remote || !is_media_entity_v4l2_subdev(remote->entity)) return NULL; if (pad) @@ -216,7 +215,7 @@ iss_video_far_end(struct iss_video *video) if (entity == &video->video.entity) continue; - if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) + if (!is_media_entity_v4l2_io(entity)) continue; far_end = to_iss_video(media_entity_to_video_device(entity)); |