Commit bed9759b authored by Denis Cheng's avatar Denis Cheng Committed by Linus Torvalds

drivers/char: use LIST_HEAD instead of LIST_HEAD_INIT

single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.
Signed-off-by: default avatarDenis Cheng <crquan@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a18b630d
...@@ -93,7 +93,7 @@ struct hvc_struct { ...@@ -93,7 +93,7 @@ struct hvc_struct {
}; };
/* dynamic list of hvc_struct instances */ /* dynamic list of hvc_struct instances */
static struct list_head hvc_structs = LIST_HEAD_INIT(hvc_structs); static LIST_HEAD(hvc_structs);
/* /*
* Protect the list of hvc_struct instances from inserts and removals during * Protect the list of hvc_struct instances from inserts and removals during
......
...@@ -306,7 +306,7 @@ struct hvcs_struct { ...@@ -306,7 +306,7 @@ struct hvcs_struct {
/* Required to back map a kref to its containing object */ /* Required to back map a kref to its containing object */
#define from_kref(k) container_of(k, struct hvcs_struct, kref) #define from_kref(k) container_of(k, struct hvcs_struct, kref)
static struct list_head hvcs_structs = LIST_HEAD_INIT(hvcs_structs); static LIST_HEAD(hvcs_structs);
static DEFINE_SPINLOCK(hvcs_structs_lock); static DEFINE_SPINLOCK(hvcs_structs_lock);
static void hvcs_unthrottle(struct tty_struct *tty); static void hvcs_unthrottle(struct tty_struct *tty);
......
...@@ -365,12 +365,12 @@ static struct device_driver ipmidriver = { ...@@ -365,12 +365,12 @@ static struct device_driver ipmidriver = {
}; };
static DEFINE_MUTEX(ipmidriver_mutex); static DEFINE_MUTEX(ipmidriver_mutex);
static struct list_head ipmi_interfaces = LIST_HEAD_INIT(ipmi_interfaces); static LIST_HEAD(ipmi_interfaces);
static DEFINE_MUTEX(ipmi_interfaces_mutex); static DEFINE_MUTEX(ipmi_interfaces_mutex);
/* List of watchers that want to know when smi's are added and /* List of watchers that want to know when smi's are added and
deleted. */ deleted. */
static struct list_head smi_watchers = LIST_HEAD_INIT(smi_watchers); static LIST_HEAD(smi_watchers);
static DEFINE_MUTEX(smi_watchers_mutex); static DEFINE_MUTEX(smi_watchers_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment