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>
This commit is contained in:
@ -27,6 +27,14 @@ struct bus_type_private {
|
||||
struct bus_type *bus;
|
||||
};
|
||||
|
||||
struct driver_private {
|
||||
struct kobject kobj;
|
||||
struct klist klist_devices;
|
||||
struct klist_node knode_bus;
|
||||
struct module_kobject *mkobj;
|
||||
struct device_driver *driver;
|
||||
};
|
||||
#define to_driver(obj) container_of(obj, struct driver_private, kobj)
|
||||
|
||||
/* initialisation functions */
|
||||
extern int devices_init(void);
|
||||
|
Reference in New Issue
Block a user