diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-01-02 13:32:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 08:41:41 +0300 |
commit | 719f1765b02c6a65eff5db3765c87444a1156cb9 (patch) | |
tree | d15a2e5eb3b970df7f12411355c1089ca1f8b67a /drivers/media/media-device.c | |
parent | ce1e60b492144b1d5ae0f67b781459325de0e884 (diff) | |
download | linux-719f1765b02c6a65eff5db3765c87444a1156cb9.tar.xz |
media: Properly pass through media entity types in entity enumeration
commit 98d85f3cb912fde14593ead54dea4c1a00b3966f upstream.
When the functions replaced media entity types, the range which was
allowed for the types was incorrect. This meant that media entity types
for specific devices were not passed correctly to the userspace through
MEDIA_IOC_ENUM_ENTITIES. Fix it.
Fixes: commit b2cd27448b33 ("[media] media-device: map new functions into old types for legacy API")
Reported-and-tested-by: Antti Laakso <antti.laakso@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r-- | drivers/media/media-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 2783531f9fc0..4462d8c69d57 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -130,7 +130,7 @@ static long media_device_enum_entities(struct media_device *mdev, * old range. */ if (ent->function < MEDIA_ENT_F_OLD_BASE || - ent->function > MEDIA_ENT_T_DEVNODE_UNKNOWN) { + ent->function > MEDIA_ENT_F_TUNER) { if (is_media_entity_v4l2_subdev(ent)) entd->type = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN; else if (ent->function != MEDIA_ENT_F_IO_V4L) |