From: Tejun Heo <htejun@gmail.com>
klist is missing static initializers and definition helper. Add them.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/klist.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/linux/klist.h b/include/linux/klist.h
index 7407125..a119c0d 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -25,6 +25,14 @@ struct klist {
void (*put)(struct klist_node *);
};
+#define KLIST_INIT(_name, _get, _put) \
+ { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \
+ .k_list = LIST_HEAD_INIT(_name.k_list), \
+ .get = _get, \
+ .put = _put, }
+
+#define DEFINE_KLIST(_name, _get, _put) \
+ struct klist _name = KLIST_INIT(_name, _get, _put)
extern void klist_init(struct klist * k, void (*get)(struct klist_node *),
void (*put)(struct klist_node *));
--
1.5.5.1
--
| Andy Whitcroft | Re: 2.6.22 -mm merge plans -- pfn_valid_within |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Fernando Luis | [PATCH] affinity is not defined in non-smp kernels - x86_64 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Wink Saville | Using git with Eclipse |
| Andy Parkins | svn:externals using git submodules |
| Jan Wielemaker | [PATCH] git-shell and git-cvsserver |
| Alf Mikula | Migrating a git repository to subversion |
| Leon Dippenaar | New tcp stack attack |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| (private) HKS | Re: sshd_config(5) PermitRootLogin yes |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Pavel Emelyanov | [PATCH net-2.6.25 9/11][INET] Merge sys.net.ipv4.ip_forward and sys.net.ipv4.conf.... |
| Evgeniy Polyakov | Re: [Bugme-new] [Bug 10556] New: IPVS sync_backup oops |
| Johannes Berg | Re: wireless vs. alignment requirements |
