diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-08 03:12:37 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 15:18:51 +0100 |
commit | bf4178a4c63443da1475c9c1bbb39963e75aa69b (patch) | |
tree | 3a6d6236d8a525f4de1d35bbb7771b56c4733335 /drivers | |
parent | [media] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuse (diff) | |
download | linux-bf4178a4c63443da1475c9c1bbb39963e75aa69b.tar.xz linux-bf4178a4c63443da1475c9c1bbb39963e75aa69b.zip |
[media] omap4iss: change the logic that checks if an entity is a subdev
As we're getting rid of an specific number range for the V4L2 subdev,
we need to replace the check for MEDIA_ENT_T_V4L2_SUBDEV by a macro.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_ipipe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c index 44220765fb3a..dd9d7d54e6f8 100644 --- a/drivers/staging/media/omap4iss/iss_ipipe.c +++ b/drivers/staging/media/omap4iss/iss_ipipe.c @@ -447,8 +447,11 @@ static int ipipe_link_setup(struct media_entity *entity, struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct iss_device *iss = to_iss_device(ipipe); - switch (local->index | media_entity_type(remote->entity)) { - case IPIPE_PAD_SINK | MEDIA_ENT_T_V4L2_SUBDEV: + if (!is_media_entity_v4l2_subdev(remote->entity)) + return -EINVAL; + + switch (local->index) { + case IPIPE_PAD_SINK: /* Read from IPIPEIF. */ if (!(flags & MEDIA_LNK_FL_ENABLED)) { ipipe->input = IPIPE_INPUT_NONE; @@ -463,7 +466,7 @@ static int ipipe_link_setup(struct media_entity *entity, break; - case IPIPE_PAD_SOURCE_VP | MEDIA_ENT_T_V4L2_SUBDEV: + case IPIPE_PAD_SOURCE_VP: /* Send to RESIZER */ if (flags & MEDIA_LNK_FL_ENABLED) { if (ipipe->output & ~IPIPE_OUTPUT_VP) |