lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectpatch klist-implement-klist_init-and-define_klist.patch added to gregkh-2.6 tree
From
Date

This is a note to let you know that I've just added the patch titled

Subject: klist: implement KLIST_INIT() and DEFINE_KLIST()

to my gregkh-2.6 tree. Its filename is

klist-implement-klist_init-and-define_klist.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


From linux-usb-owner@vger.kernel.org Fri Apr 25 11:19:08 2008
From: Tejun Heo <htejun@gmail.com>
Date: Sat, 26 Apr 2008 03:16:04 +0900
Subject: klist: implement KLIST_INIT() and DEFINE_KLIST()
To: Greg KH <greg@kroah.com>
Cc: Peter Zijlstra <peterz@infradead.org>, James Bottomley <James.Bottomley@HansenPartnership.com>, Alan Stern <stern@rowland.harvard.edu>, Andrew Morton <akpm@linux-foundation.org>, oliver@neukum.org, Alan Cox <alan@lxorguk.ukuu.org.uk>, zaitcev@redhat.com, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-usb@vger.kernel.org
Message-ID: <48121FE4.5010803@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 file changed, 8 insertions(+)

--- 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 *));

Patches currently in gregkh-2.6 which might be from htejun@gmail.com are

driver-core/sysfs-add-sys-dev-char-block-to-lookup-sysfs-path-by-major-minor.patch
driver-core/klist-implement-klist_add_-after-before.patch
driver-core/klist-implement-klist_init-and-define_klist.patch


\
 
 \ /
  Last update: 2008-04-29 01:59    [W:0.062 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site