X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=blobdiff_plain;f=drivers%2Fbase%2Fdd.c;h=d5bbce38282fd233f06ef77891257a399be2471e;hp=eab2030c506d0d3751a0d5a107aa4c32e7eda5e2;hb=d856f1e337782326c638c70c0b4df2b909350dec;hpb=c95a6b057b108c2b7add35cba1354f9af921349e diff --git a/drivers/base/dd.c b/drivers/base/dd.c index eab2030..d5bbce3 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -42,7 +42,7 @@ void device_bind_driver(struct device * dev) { pr_debug("bound device '%s' to driver '%s'\n", dev->bus_id, dev->driver->name); - klist_add_tail(&dev->driver->klist_devices, &dev->knode_driver); + klist_add_tail(&dev->knode_driver, &dev->driver->klist_devices); sysfs_create_link(&dev->driver->kobj, &dev->kobj, kobject_name(&dev->kobj)); sysfs_create_link(&dev->kobj, &dev->driver->kobj, "driver"); @@ -65,7 +65,7 @@ void device_bind_driver(struct device * dev) * * This function must be called with @dev->sem held. */ -static int driver_probe_device(struct device_driver * drv, struct device * dev) +int driver_probe_device(struct device_driver * drv, struct device * dev) { int ret = 0; @@ -119,7 +119,8 @@ static int __device_attach(struct device_driver * drv, void * data) * driver_probe_device() for each pair. If a compatible * pair is found, break out and return. * - * Returns 1 if the device was bound to a driver; 0 otherwise. + * Returns 1 if the device was bound to a driver; + * 0 if no matching device was found; error code otherwise. */ int device_attach(struct device * dev) {