diff options
| author | Patrick Mochel <mochel@segfault.osdl.org> | 2002-03-25 22:12:38 -0800 |
|---|---|---|
| committer | Patrick Mochel <mochel@segfault.osdl.org> | 2002-03-25 22:12:38 -0800 |
| commit | fba46407ee71baf4f4d0ebc3156920bc0318cd1d (patch) | |
| tree | 6f8468ef7314e95b0b65becbb66ff7ad3a99f9e5 /include | |
| parent | e305166b86017833b6a0610174575f8fc8d9e41f (diff) | |
Driver model update:
Create global list in which all devices are inserted. Done by Kai Germaschewski.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |
