Skip to contentSkip to conversation

alsa-driver: RHEL 6.1 compilation fix

PATCH Applied Konstantin Ozerkov 2 participants 2 messages Nov 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-driver: RHEL 6.1 compilation fix

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)

include/adriver.h +3 -0
index d9c7dee..aeb084e 100644
@@ -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>
Signature · 1 line
1.7.1
Applied
#1 lore raw

At Tue, 8 Nov 2011 19:47:27 +0400,

Quoted 10 lines · Konstantin Ozerkov

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)

Thanks, applied now.

Takashi

Quoted 24 lines
include/adriver.h +3 -0
index d9c7dee..aeb084e 100644
@@ -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>
Signature · 1 line
1.7.1