diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-28 18:59:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:35 -0500 |
commit | e5dd12784617f0f1fae5f96a7fac1ec4c49fadbe (patch) | |
tree | c81e2a2f3aa1c60b92951d398774f1391bdc6a1c /include | |
parent | c63469a3985a9771c18a916b8d42845d044ea0b1 (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 'include')
-rw-r--r-- | include/linux/device.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 721ee318d57b..92ba3a874627 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | struct device; | 33 | struct device; |
34 | struct device_driver; | 34 | struct device_driver; |
35 | struct driver_private; | ||
35 | struct class; | 36 | struct class; |
36 | struct class_device; | 37 | struct class_device; |
37 | struct bus_type; | 38 | struct bus_type; |
@@ -113,16 +114,11 @@ extern struct kset *bus_get_kset(struct bus_type *bus); | |||
113 | extern struct klist *bus_get_device_klist(struct bus_type *bus); | 114 | extern struct klist *bus_get_device_klist(struct bus_type *bus); |
114 | 115 | ||
115 | struct device_driver { | 116 | struct device_driver { |
116 | const char * name; | 117 | const char *name; |
117 | struct bus_type * bus; | 118 | struct bus_type *bus; |
118 | |||
119 | struct kobject kobj; | ||
120 | struct klist klist_devices; | ||
121 | struct klist_node knode_bus; | ||
122 | 119 | ||
123 | struct module * owner; | 120 | struct module *owner; |
124 | const char * mod_name; /* used for built-in modules */ | 121 | const char *mod_name; /* used for built-in modules */ |
125 | struct module_kobject * mkobj; | ||
126 | 122 | ||
127 | int (*probe) (struct device * dev); | 123 | int (*probe) (struct device * dev); |
128 | int (*remove) (struct device * dev); | 124 | int (*remove) (struct device * dev); |
@@ -130,6 +126,8 @@ struct device_driver { | |||
130 | int (*suspend) (struct device * dev, pm_message_t state); | 126 | int (*suspend) (struct device * dev, pm_message_t state); |
131 | int (*resume) (struct device * dev); | 127 | int (*resume) (struct device * dev); |
132 | struct attribute_group **groups; | 128 | struct attribute_group **groups; |
129 | |||
130 | struct driver_private *p; | ||
133 | }; | 131 | }; |
134 | 132 | ||
135 | 133 | ||