[alsa-devel] [PATCH 1/1] alsa-driver: RHEL 6.1 compilation fix
Konstantin Ozerkov
kozerkov at parallels.com
Tue Nov 8 16:47:27 CET 2011
RHEL 6.1 (2.6.32-132.*) kernels already have hex_to_bin() function.
Tune check in the alsa-driver/include/adriver.h
Tested on Scientific Linux 6.1 (RHEL 6.1 clone), kernels:
2.6.32-131.0.15.el6.x86_64 (original, from DVD installation)
2.6.32-131.17.1.el6.x86_64 (last security update)
Signed-off-by: Konstantin Ozerkov <kozerkov at parallels.com>
Signed-off-by: Denis V. Lunev <den at openvz.org>
diff --git a/include/adriver.h b/include/adriver.h
index d9c7dee..aeb084e 100644
--- a/include/adriver.h
+++ b/include/adriver.h
@@ -1920,6 +1920,8 @@ blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
/* hex_to_bin() */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
+/* RHEL 6.1 kernels has version 2.6.32, but already have hex_to_bin() */
+#if !defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(6,1)
static inline int hex_to_bin(char c)
{
if (c >= '0' && c <= '9')
@@ -1931,6 +1933,7 @@ static inline int hex_to_bin(char c)
return -1;
}
#endif
+#endif
#ifndef CONFIG_HAVE_VZALLOC
#include <linux/vmalloc.h>
--
1.7.1
More information about the Alsa-devel
mailing list