From e70268341b180f56b3c39bc5b3c3b5765824352e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 30 Jun 2014 07:28:18 +0000 Subject: [PATCH] scst: Build fix for kernel versions <= 2.6.31 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5648 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 3fea05c8c..28e79fc02 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -4327,11 +4327,16 @@ static inline int cancel_delayed_work_sync(struct delayed_work *work) #endif #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) && \ + defined(CONFIG_DEBUG_LOCK_ALLOC) extern struct lockdep_map scst_suspend_dep_map; #define scst_assert_activity_suspended() \ WARN_ON(debug_locks && !lock_is_held(&scst_suspend_dep_map)); #else +/* + * See also patch "lockdep: Introduce lockdep_assert_held()" (commit ID + * f607c6685774811b8112e124f10a053d77015485) + */ #define scst_assert_activity_suspended() do { } while (0) #endif