aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormochel@digitalimplant.org <mochel@digitalimplant.org>2005-03-24 22:08:30 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:23 -0400
commit36239577cfb6b9a7c111209536b54200b0252ebf (patch)
treef8fa5034fbb31d273d0889119cbc20e4c4b0c983 /include
parent9a881f166f473373589ce6f3fdc47b44a1450e2d (diff)
[PATCH] Use a klist for device child lists.
- Use klist iterator in device_for_each_child(), making it safe to use for removing devices. - Remove unused list_to_dev() function. - Kills all usage of devices_subsys.rwsem. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index d2434934d091..43249260cd1c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -262,8 +262,8 @@ extern void class_device_destroy(struct class *cls, dev_t devt);
262 262
263 263
264struct device { 264struct device {
265 struct list_head node; /* node in sibling list */ 265 struct klist klist_children;
266 struct list_head children; 266 struct klist_node knode_parent; /* node in sibling list */
267 struct klist_node knode_driver; 267 struct klist_node knode_driver;
268 struct klist_node knode_bus; 268 struct klist_node knode_bus;
269 struct device * parent; 269 struct device * parent;
@@ -298,12 +298,6 @@ struct device {
298 void (*release)(struct device * dev); 298 void (*release)(struct device * dev);
299}; 299};
300 300
301static inline struct device *
302list_to_dev(struct list_head *node)
303{
304 return list_entry(node, struct device, node);
305}
306
307static inline void * 301static inline void *
308dev_get_drvdata (struct device *dev) 302dev_get_drvdata (struct device *dev)
309{ 303{