]> err.no Git - linux-2.6/blobdiff - drivers/base/dd.c
[PATCH] Fix function/macro name collision on i386 oprofile
[linux-2.6] / drivers / base / dd.c
index eab2030c506d0d3751a0d5a107aa4c32e7eda5e2..d5bbce38282fd233f06ef77891257a399be2471e 100644 (file)
@@ -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)
 {