summaryrefslogtreecommitdiffstats
path: root/include/linux/plist.h
diff options
context:
space:
mode:
authorGregory Haskins <ghaskins@novell.com>2008-12-29 09:39:53 -0500
committerGregory Haskins <ghaskins@novell.com>2008-12-29 09:39:53 -0500
commit4075134e40804821f90866d7de56802e4dcecb1e (patch)
tree9aa144dad122a6596ff34e71bc049112fb0de354 /include/linux/plist.h
parent967fc04671feea4dbf780c9e55a0bc8fcf68a14e (diff)
downloadlinux-stable-4075134e40804821f90866d7de56802e4dcecb1e.tar.gz
linux-stable-4075134e40804821f90866d7de56802e4dcecb1e.tar.bz2
linux-stable-4075134e40804821f90866d7de56802e4dcecb1e.zip
plist: fix PLIST_NODE_INIT to work with debug enabled
It seems that PLIST_NODE_INIT breaks if used and DEBUG_PI_LIST is defined. Since there are no current users of PLIST_NODE_INIT, this has gone undetected. This patch fixes the build issue that enables the DEBUG_PI_LIST later in the series when we use it in init_task.h Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Diffstat (limited to 'include/linux/plist.h')
-rw-r--r--include/linux/plist.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/plist.h b/include/linux/plist.h
index 85de2f055874..45926d77d6ac 100644
--- a/include/linux/plist.h
+++ b/include/linux/plist.h
@@ -96,6 +96,10 @@ struct plist_node {
# define PLIST_HEAD_LOCK_INIT(_lock)
#endif
+#define _PLIST_HEAD_INIT(head) \
+ .prio_list = LIST_HEAD_INIT((head).prio_list), \
+ .node_list = LIST_HEAD_INIT((head).node_list)
+
/**
* PLIST_HEAD_INIT - static struct plist_head initializer
* @head: struct plist_head variable name
@@ -103,8 +107,7 @@ struct plist_node {
*/
#define PLIST_HEAD_INIT(head, _lock) \
{ \
- .prio_list = LIST_HEAD_INIT((head).prio_list), \
- .node_list = LIST_HEAD_INIT((head).node_list), \
+ _PLIST_HEAD_INIT(head), \
PLIST_HEAD_LOCK_INIT(&(_lock)) \
}
@@ -116,7 +119,7 @@ struct plist_node {
#define PLIST_NODE_INIT(node, __prio) \
{ \
.prio = (__prio), \
- .plist = PLIST_HEAD_INIT((node).plist, NULL), \
+ .plist = { _PLIST_HEAD_INIT((node).plist) }, \
}
/**