summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-01-06 08:57:46 -0600
committerPatrick Mochel <mochel@osdl.org>2003-01-06 08:57:46 -0600
commitc3016fe6abf9a2baf8accbe22ef964d506bd9e8a (patch)
tree3e95559532c95a6e3e948e4f87a3accd4a3a60d5 /include
parent45cd2cfe8d04830d838cb348f7d181b877a63c49 (diff)
driver model: allow manual binding of devices to drivers.
This creates and exports device_bind_driver() and device_release_driver() that allow a caller to manually bind a device to a driver. Apparantly, some drivers use this functionality (like USB): a driver binds to other device interfaces during the driver's probe() method call for the first interface. Implementation is easy enough, since it simply involves renaming and exporting the internal functions attach() and detach().
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 998ca9a08299..f2e9b50cad58 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -306,6 +306,14 @@ extern void device_initialize(struct device * dev);
extern int device_add(struct device * dev);
extern void device_del(struct device * dev);
+/*
+ * Manual binding of a device to driver. See drivers/base/bus.c
+ * for information on use.
+ */
+extern void device_bind_driver(struct device * dev);
+extern void device_release_driver(struct device * dev);
+
+
/* driverfs interface for exporting device attributes */
struct device_attribute {