Commit 0d116d5f authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

[PATCH] Driver core: export device_attach

Driver core: make device_attach() global and export it and
             driver_attach() so subsystems can have finer
             control over binding process.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 46c94ace
...@@ -288,7 +288,7 @@ static int bus_match(struct device * dev, struct device_driver * drv) ...@@ -288,7 +288,7 @@ static int bus_match(struct device * dev, struct device_driver * drv)
* Walk the list of drivers that the bus has and call bus_match() * Walk the list of drivers that the bus has and call bus_match()
* for each pair. If a compatible pair is found, break out and return. * for each pair. If a compatible pair is found, break out and return.
*/ */
static int device_attach(struct device * dev) int device_attach(struct device * dev)
{ {
struct bus_type * bus = dev->bus; struct bus_type * bus = dev->bus;
struct list_head * entry; struct list_head * entry;
...@@ -728,6 +728,8 @@ EXPORT_SYMBOL_GPL(bus_for_each_drv); ...@@ -728,6 +728,8 @@ EXPORT_SYMBOL_GPL(bus_for_each_drv);
EXPORT_SYMBOL_GPL(device_bind_driver); EXPORT_SYMBOL_GPL(device_bind_driver);
EXPORT_SYMBOL_GPL(device_release_driver); EXPORT_SYMBOL_GPL(device_release_driver);
EXPORT_SYMBOL_GPL(device_attach);
EXPORT_SYMBOL_GPL(driver_attach);
EXPORT_SYMBOL_GPL(bus_add_device); EXPORT_SYMBOL_GPL(bus_add_device);
EXPORT_SYMBOL_GPL(bus_remove_device); EXPORT_SYMBOL_GPL(bus_remove_device);
......
...@@ -327,6 +327,7 @@ extern int device_for_each_child(struct device *, void *, ...@@ -327,6 +327,7 @@ extern int device_for_each_child(struct device *, void *,
*/ */
extern void device_bind_driver(struct device * dev); extern void device_bind_driver(struct device * dev);
extern void device_release_driver(struct device * dev); extern void device_release_driver(struct device * dev);
extern int device_attach(struct device * dev);
extern void driver_attach(struct device_driver * drv); extern void driver_attach(struct device_driver * drv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment