aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-28 18:59:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:35 -0500
commite5dd12784617f0f1fae5f96a7fac1ec4c49fadbe (patch)
treec81e2a2f3aa1c60b92951d398774f1391bdc6a1c /drivers/base/base.h
parentc63469a3985a9771c18a916b8d42845d044ea0b1 (diff)
Driver core: move the static kobject out of struct driver
This patch removes the kobject, and a few other driver-core-only fields out of struct driver and into the driver core only. Now drivers can be safely create on the stack or statically (like they currently are.) Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 05472360f6a2..3b0f395552db 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -27,6 +27,14 @@ struct bus_type_private {
27 struct bus_type *bus; 27 struct bus_type *bus;
28}; 28};
29 29
30struct driver_private {
31 struct kobject kobj;
32 struct klist klist_devices;
33 struct klist_node knode_bus;
34 struct module_kobject *mkobj;
35 struct device_driver *driver;
36};
37#define to_driver(obj) container_of(obj, struct driver_private, kobj)
30 38
31/* initialisation functions */ 39/* initialisation functions */
32extern int devices_init(void); 40extern int devices_init(void);