From cfe7b53ad39049f6c83ae8b47bf80d8f01158a5f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 15 Apr 2015 13:10:58 +0200 Subject: [PATCH] qla2x00t: Port to RHEL 6 Although RHEL 6 is based on the 2.6.32 kernel, for RHEL 6.1 the argument list for sysfs callback functions follows the style of kernel 2.6.35. Signed-off-by: Bart Van Assche --- qla2x00t/qla_attr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qla2x00t/qla_attr.c b/qla2x00t/qla_attr.c index 3adcf4987..ec98b4cee 100644 --- a/qla2x00t/qla_attr.c +++ b/qla2x00t/qla_attr.c @@ -1168,7 +1168,9 @@ static struct bin_attribute sysfs_sfp_attr = { }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_reset( #else qla2x00_sysfs_write_reset(struct file *file, @@ -1248,7 +1250,9 @@ static struct bin_attribute sysfs_reset_attr = { }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_xgmac_stats( #else qla2x00_sysfs_read_xgmac_stats(struct file *file, @@ -1305,7 +1309,9 @@ static struct bin_attribute sysfs_xgmac_stats_attr = { }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_dcbx_tlv( #else qla2x00_sysfs_read_dcbx_tlv(struct file *file,