From: Konstantin Ozerkov Subject: [PATCH 1/1] alsa-driver: RHEL 6.1 compilation fix Date: Tue, 8 Nov 2011 19:47:27 +0400 Message-ID: <1320767247-20933-1-git-send-email-kozerkov@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: patch@alsa-project.org Cc: "Denis V. Lunev" , alsa-devel@alsa-project.org, Konstantin Ozerkov List-Id: alsa-devel@alsa-project.org 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 Signed-off-by: Denis V. Lunev 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 -- 1.7.1