This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: libmediactl: Don't try to parse empty major,minor
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Sat Mar 5 07:57:21 2016 -0300

The Kernel support for the legacy MEDIA_IOC_ENUM_ENTITIES will
only fill entity major,minor for a few entities. So, there
are several cases where both major and minor are zero.

While it won't cause any known harm, let's avoid parsing
major/minor, when those fields are not filled by the Kernel.

While here, remove the useless check for MEDIA_ENT_T_DEVNODE_ALSA.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 utils/media-ctl/libmediactl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=f19fa086f77db5607405143dfac4509c73ce2f64
diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index 4a82d24c6722..89ac11c38b4c 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -569,8 +569,11 @@ static int media_enum_entities(struct media_device *media)
 
                /* Find the corresponding device name. */
                if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE &&
-                   media_entity_type(entity) != MEDIA_ENT_T_V4L2_SUBDEV &&
-                   entity->info.type == MEDIA_ENT_T_DEVNODE_ALSA)
+                   media_entity_type(entity) != MEDIA_ENT_T_V4L2_SUBDEV)
+                       continue;
+
+               /* Don't try to parse empty major,minor */
+               if (!entity->info.dev.major && !entity->info.dev.minor)
                        continue;
 
                /* Try to get the device name via udev */

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to