alsa-driver: RHEL 6.1 compilation fix
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)
Signed-off-by Konstantin Ozerkov <[email protected]>
Signed-off-by Denis V. Lunev <[email protected]>
include/adriver.h +3 -0
@@ -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
Takashi Iwai
AppliedAt 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 thealsa-driver/include/adriver.hTested 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 <[email protected]>Signed-off-by Denis V. Lunev <[email protected]>
Thanks, applied now.
Takashi
Quoted 24 lines
include/adriver.h +3
-0@@ -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