diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-01-24 13:35:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:00:36 -0500 |
commit | 9875bb480cc89d9b690f7028aadf7e58454f0dae (patch) | |
tree | 45116b0424af02a708abf58c56967c14dcfc06d5 | |
parent | f3ff9247088a0af0c192a28908dab76ff3d8871f (diff) |
Eliminate get_driver() and put_driver()
Now that there are no users of get_driver() or put_driver(), this
patch (as1513) removes those routines completely.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/base/driver.c | 28 | ||||
-rw-r--r-- | include/linux/device.h | 2 |
2 files changed, 0 insertions, 30 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index e979cad75c6e..60e4f77ca662 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -153,34 +153,6 @@ int driver_add_kobj(struct device_driver *drv, struct kobject *kobj, | |||
153 | } | 153 | } |
154 | EXPORT_SYMBOL_GPL(driver_add_kobj); | 154 | EXPORT_SYMBOL_GPL(driver_add_kobj); |
155 | 155 | ||
156 | /** | ||
157 | * get_driver - increment driver reference count. | ||
158 | * @drv: driver. | ||
159 | */ | ||
160 | struct device_driver *get_driver(struct device_driver *drv) | ||
161 | { | ||
162 | if (drv) { | ||
163 | struct driver_private *priv; | ||
164 | struct kobject *kobj; | ||
165 | |||
166 | kobj = kobject_get(&drv->p->kobj); | ||
167 | priv = to_driver(kobj); | ||
168 | return priv->driver; | ||
169 | } | ||
170 | return NULL; | ||
171 | } | ||
172 | EXPORT_SYMBOL_GPL(get_driver); | ||
173 | |||
174 | /** | ||
175 | * put_driver - decrement driver's refcount. | ||
176 | * @drv: driver. | ||
177 | */ | ||
178 | void put_driver(struct device_driver *drv) | ||
179 | { | ||
180 | kobject_put(&drv->p->kobj); | ||
181 | } | ||
182 | EXPORT_SYMBOL_GPL(put_driver); | ||
183 | |||
184 | static int driver_add_groups(struct device_driver *drv, | 156 | static int driver_add_groups(struct device_driver *drv, |
185 | const struct attribute_group **groups) | 157 | const struct attribute_group **groups) |
186 | { | 158 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index a782d7ff9e8b..d28bd8295677 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -238,8 +238,6 @@ struct device_driver { | |||
238 | extern int __must_check driver_register(struct device_driver *drv); | 238 | extern int __must_check driver_register(struct device_driver *drv); |
239 | extern void driver_unregister(struct device_driver *drv); | 239 | extern void driver_unregister(struct device_driver *drv); |
240 | 240 | ||
241 | extern struct device_driver *get_driver(struct device_driver *drv); | ||
242 | extern void put_driver(struct device_driver *drv); | ||
243 | extern struct device_driver *driver_find(const char *name, | 241 | extern struct device_driver *driver_find(const char *name, |
244 | struct bus_type *bus); | 242 | struct bus_type *bus); |
245 | extern int driver_probe_done(void); | 243 | extern int driver_probe_done(void); |