Commit 91cfad75 authored by Patrick Mochel's avatar Patrick Mochel

driver model: make sure we only try to bind drivers to devices that don't have a driver.

parent cdca2b1c
......@@ -148,8 +148,10 @@ static int driver_attach(struct device_driver * drv)
list_for_each(entry,&bus->devices) {
struct device * dev = container_of(entry,struct device,bus_list);
if (get_device(dev)) {
if (!bus_match(dev,drv) && dev->driver)
devclass_add_device(dev);
if (!dev->driver) {
if (!bus_match(dev,drv) && dev->driver)
devclass_add_device(dev);
}
put_device(dev);
}
}
......
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