Rewrote four #if statements such that these can be parsed by scripts/generate-kernel-patch.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1865 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-07-23 07:24:27 +00:00
parent 04556369b4
commit 5da3fc1f1b
2 changed files with 12 additions and 8 deletions
+6 -4
View File
@@ -703,9 +703,10 @@ int iscsi_add_attr(struct iscsi_target *target,
struct iscsi_attr *tgt_attr;
struct list_head *attrs_list;
const char *name;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
defined(CONFIG_DEBUG_LOCK_ALLOC))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
static struct lock_class_key __key;
#endif
#endif
TRACE_ENTRY();
@@ -753,9 +754,10 @@ int iscsi_add_attr(struct iscsi_target *target,
tgt_attr->attr.attr.name = tgt_attr->name;
tgt_attr->attr.attr.owner = THIS_MODULE;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
defined(CONFIG_DEBUG_LOCK_ALLOC))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
tgt_attr->attr.attr.key = &__key;
#endif
#endif
tgt_attr->attr.attr.mode = attr_info->mode & (S_IRUGO | S_IWUGO);
tgt_attr->attr.show = iscsi_attr_show;
+6 -4
View File
@@ -2530,9 +2530,10 @@ int scst_create_acn_sysfs(struct scst_acg *acg, struct scst_acn *acn)
int retval = 0;
int len;
struct kobj_attribute *attr = NULL;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
defined(CONFIG_DEBUG_LOCK_ALLOC))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
static struct lock_class_key __key;
#endif
#endif
TRACE_ENTRY();
@@ -2558,9 +2559,10 @@ int scst_create_acn_sysfs(struct scst_acg *acg, struct scst_acn *acn)
strlcpy((char *)attr->attr.name, acn->name, len);
attr->attr.owner = THIS_MODULE;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
defined(CONFIG_DEBUG_LOCK_ALLOC))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
attr->attr.key = &__key;
#endif
#endif
attr->attr.mode = S_IRUGO;