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) {