aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-22 19:09:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-30 01:48:04 -0400
commitafdce75f1eaebcf358b7594ba7969aade105c3b0 (patch)
tree5374a0e85e03c8706a1dd95478b9d0a3312917e0 /drivers/base/base.h
parent151ef38f7c0ec1b0420f04438b0316e3a30bf2e4 (diff)
[PATCH] driver core: Add the ability to bind drivers to devices from userspace
This adds a single file, "bind", to the sysfs directory of every driver registered with the driver core. To bind a device to a driver, write the bus id of the device you wish to bind to that specific driver to the "bind" file (remember to not add a trailing \n). If that bus id matches a device on that bus, and it does not currently have a driver bound to it, the probe sequence will be initiated with that driver and device. Note, this requires that the driver itself be willing and able to accept that device (usually through a device id type table). This patch does not make it possible to override the driver's id table. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 645f62692920..783752b68a9a 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -5,6 +5,7 @@ extern int bus_add_driver(struct device_driver *);
5extern void bus_remove_driver(struct device_driver *); 5extern void bus_remove_driver(struct device_driver *);
6 6
7extern void driver_detach(struct device_driver * drv); 7extern void driver_detach(struct device_driver * drv);
8extern int driver_probe_device(struct device_driver *, struct device *);
8 9
9static inline struct class_device *to_class_dev(struct kobject *obj) 10static inline struct class_device *to_class_dev(struct kobject *obj)
10{ 11{