From 3fb6b9e6e7bc05e7629f387222a46903ba39ef99 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 7 Dec 2010 17:30:09 +0000 Subject: [PATCH] scst_disk builds again on kernel 2.6.30 and before (was broken by r2836). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2965 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 7 +++++++ scst/src/scst_targ.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 43cc31040..85a45ad87 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -132,6 +132,13 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) +static inline unsigned int queue_max_hw_sectors(struct request_queue *q) +{ + return q->max_hw_sectors; +} +#endif + /* * Version numbers, the same as for the kernel. * diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 9d061dcbd..0a75af1e8 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2441,13 +2441,6 @@ static struct scst_cmd *scst_post_exec_sn(struct scst_cmd *cmd, return res; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) -static inline unsigned int queue_max_hw_sectors(struct request_queue *q) -{ - return q->max_hw_sectors; -} -#endif - /* cmd must be additionally referenced to not die inside */ static int scst_do_real_exec(struct scst_cmd *cmd) {