@@ -32,6 +32,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -128,6 +129,8 @@ __media_ioctl(struct file *filp, unsigned int cmd, unsigned long arg,
if (!media_devnode_is_registered(devnode))
return -EIO;
+ msleep(1000);
+
return ioctl_func(filp, cmd, arg);
}
And calling MEDIA_IOC_ENUM_ENTITIES (for instance) in a loop (v4l-utils):
@@ -522,7 +522,7 @@ static int media_enum_entities(struct media_device *media)
entity->fd = -1;
entity->info.id = id | MEDIA_ENT_ID_FLAG_NEXT;
entity->media = media;
-
+while (1)
ret = ioctl(media->fd, MEDIA_IOC_ENUM_ENTITIES, &entity->info);
if (ret < 0) {
ret = errno != EINVAL ? -errno : 0;