aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-03-05 13:16:02 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-05 13:16:02 (GMT)
commit21f1f84487e7b7487a609cb336590d5c1be78ece (patch)
tree82ca224caa77f9fb351ebc7edf8c2d0bb2f4c95d
parenteeb36980ecb2786c4a0a9f03d6a4cb6e3dd4d99a (diff)
Add backport support for usleep_range
This is not a perfect backport, but it should work Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--v4l/compat.h4
-rwxr-xr-xv4l/scripts/make_config_compat.pl1
2 files changed, 5 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 69f9484..38ebfb0 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -792,4 +792,8 @@ static inline int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int
#define sysfs_attr_init(a) 0
#endif
+#ifdef NEED_USLEEP_RANGE
+#define usleep_range(min, max) msleep(min/1000)
+#endif
+
#endif /* _COMPAT_H */
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index a9d23e0..a426134 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -491,6 +491,7 @@ sub check_other_dependencies()
check_file_for_func("include/linux/kernel.h", "hex_to_bin", "NEED_HEX_TO_BIN");
check_file_for_func("include/sound/control.h", "snd_ctl_enum_info", "NEED_SND_CTL_ENUM_INFO");
check_file_for_func("include/linux/sysfs.h", "sysfs_attr_init", "NEED_SYSFS_ATTR_INIT");
+ check_file_for_func("include/linux/delay.h", "usleep_range", "NEED_USLEEP_RANGE");
}
# Do the basic rules

Privacy Policy