aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index b400314e1c6..1214cbd17d8 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/device.h> 11#include <linux/device.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
@@ -143,20 +142,6 @@ void put_driver(struct device_driver * drv)
143 kobject_put(&drv->kobj); 142 kobject_put(&drv->kobj);
144} 143}
145 144
146static void klist_devices_get(struct klist_node *n)
147{
148 struct device *dev = container_of(n, struct device, knode_driver);
149
150 get_device(dev);
151}
152
153static void klist_devices_put(struct klist_node *n)
154{
155 struct device *dev = container_of(n, struct device, knode_driver);
156
157 put_device(dev);
158}
159
160/** 145/**
161 * driver_register - register driver with bus 146 * driver_register - register driver with bus
162 * @drv: driver to register 147 * @drv: driver to register
@@ -176,7 +161,7 @@ int driver_register(struct device_driver * drv)
176 (drv->bus->shutdown && drv->shutdown)) { 161 (drv->bus->shutdown && drv->shutdown)) {
177 printk(KERN_WARNING "Driver '%s' needs updating - please use bus_type methods\n", drv->name); 162 printk(KERN_WARNING "Driver '%s' needs updating - please use bus_type methods\n", drv->name);
178 } 163 }
179 klist_init(&drv->klist_devices, klist_devices_get, klist_devices_put); 164 klist_init(&drv->klist_devices, NULL, NULL);
180 init_completion(&drv->unloaded); 165 init_completion(&drv->unloaded);
181 return bus_add_driver(drv); 166 return bus_add_driver(drv);
182} 167}