From fba46407ee71baf4f4d0ebc3156920bc0318cd1d Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Mon, 25 Mar 2002 22:12:38 -0800 Subject: Driver model update: Create global list in which all devices are inserted. Done by Kai Germaschewski. --- include/linux/device.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/device.h b/include/linux/device.h index 23423daa895c..69797acdc546 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -64,6 +64,7 @@ struct device_driver { }; struct device { + struct list_head g_list; /* node in depth-first order list */ struct list_head node; /* node in sibling list */ struct list_head children; struct device * parent; @@ -99,6 +100,12 @@ list_to_dev(struct list_head *node) return list_entry(node, struct device, node); } +static inline struct device * +g_list_to_dev(struct list_head *g_list) +{ + return list_entry(g_list, struct device, g_list); +} + /* * High level routines for use by the bus drivers */ -- cgit v1.2.3