Skip to content

Commit

Permalink
Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init
Browse files Browse the repository at this point in the history
LIST_HEAD has been widely used, so switch to this simpler method.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Denis Cheng authored and Greg Kroah-Hartman committed Jan 25, 2008
1 parent 44bfe16 commit db1118a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
9 changes: 1 addition & 8 deletions drivers/base/attribute_container.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
1 change: 0 additions & 1 deletion drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion drivers/base/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ void __init driver_init(void)
system_bus_init();
cpu_dev_init();
memory_dev_init();
attribute_container_init();
}

0 comments on commit db1118a

Please sign in to comment.