summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authormochel@digitalimplant.org <mochel@digitalimplant.org>2005-03-24 19:08:30 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 15:15:23 -0700
commit36239577cfb6b9a7c111209536b54200b0252ebf (patch)
treef8fa5034fbb31d273d0889119cbc20e4c4b0c983 /include/linux/device.h
parent9a881f166f473373589ce6f3fdc47b44a1450e2d (diff)
downloadop-kernel-dev-36239577cfb6b9a7c111209536b54200b0252ebf.zip
op-kernel-dev-36239577cfb6b9a7c111209536b54200b0252ebf.tar.gz
[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/linux/device.h')
-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 d243493..4324926 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);
struct device {
- struct list_head node; /* node in sibling list */
- struct list_head children;
+ struct klist klist_children;
+ struct klist_node knode_parent; /* node in sibling list */
struct klist_node knode_driver;
struct klist_node knode_bus;
struct device * parent;
@@ -298,12 +298,6 @@ struct device {
void (*release)(struct device * dev);
};
-static inline struct device *
-list_to_dev(struct list_head *node)
-{
- return list_entry(node, struct device, node);
-}
-
static inline void *
dev_get_drvdata (struct device *dev)
{
OpenPOWER on IntegriCloud