Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db1118a460c7bfd20278955cbf56c0b283a9701f
Commit:     db1118a460c7bfd20278955cbf56c0b283a9701f
Parent:     44bfe16e1083d66f97a5289e359c52ee2c8b19a7
Author:     Denis Cheng <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 6 02:24:40 2007 +0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:41 2008 -0800

    Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init
    
    LIST_HEAD has been widely used, so switch to this simpler method.
    
    Signed-off-by: Denis Cheng <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/attribute_container.c |    9 +--------
 drivers/base/base.h                |    1 -
 drivers/base/init.c                |    1 -
 3 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/drivers/base/attribute_container.c 
b/drivers/base/attribute_container.c
index 7370d7c..d4dfb97 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -61,7 +61,7 @@ attribute_container_classdev_to_container(struct class_device 
*classdev)
 }
 EXPORT_SYMBOL_GPL(attribute_container_classdev_to_container);
 
-static struct list_head attribute_container_list;
+static LIST_HEAD(attribute_container_list);
 
 static DEFINE_MUTEX(attribute_container_mutex);
 
@@ -429,10 +429,3 @@ attribute_container_find_class_device(struct 
attribute_container *cont,
        return cdev;
 }
 EXPORT_SYMBOL_GPL(attribute_container_find_class_device);
-
-int __init
-attribute_container_init(void)
-{
-       INIT_LIST_HEAD(&attribute_container_list);
-       return 0;
-}
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 3b0f395..a74ceda 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -49,7 +49,6 @@ static inline int hypervisor_init(void) { return 0; }
 extern int platform_bus_init(void);
 extern int system_bus_init(void);
 extern int cpu_dev_init(void);
-extern int attribute_container_init(void);
 
 extern int bus_add_device(struct device * dev);
 extern void bus_attach_device(struct device * dev);
diff --git a/drivers/base/init.c b/drivers/base/init.c
index 3713815..1da88a1 100644
--- a/drivers/base/init.c
+++ b/drivers/base/init.c
@@ -36,5 +36,4 @@ void __init driver_init(void)
        system_bus_init();
        cpu_dev_init();
        memory_dev_init();
-       attribute_container_init();
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to