Lines Matching refs:drv
242 struct device_driver *drv = dev->driver; in driver_sysfs_remove() local
244 if (drv) { in driver_sysfs_remove()
245 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove()
278 static int really_probe(struct device *dev, struct device_driver *drv) in really_probe() argument
285 drv->bus->name, __func__, drv->name, dev_name(dev)); in really_probe()
288 dev->driver = drv; in really_probe()
311 } else if (drv->probe) { in really_probe()
312 ret = drv->probe(dev); in really_probe()
323 drv->bus->name, __func__, dev_name(dev), drv->name); in really_probe()
337 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in really_probe()
346 drv->name, dev_name(dev), ret); in really_probe()
352 drv->name, dev_name(dev), ret); in really_probe()
403 int driver_probe_device(struct device_driver *drv, struct device *dev) in driver_probe_device() argument
411 drv->bus->name, __func__, dev_name(dev), drv->name); in driver_probe_device()
414 ret = really_probe(dev, drv); in driver_probe_device()
420 static int __device_attach(struct device_driver *drv, void *data) in __device_attach() argument
424 if (!driver_match_device(drv, dev)) in __device_attach()
427 return driver_probe_device(drv, dev); in __device_attach()
473 struct device_driver *drv = data; in __driver_attach() local
485 if (!driver_match_device(drv, dev)) in __driver_attach()
492 driver_probe_device(drv, dev); in __driver_attach()
509 int driver_attach(struct device_driver *drv) in driver_attach() argument
511 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); in driver_attach()
521 struct device_driver *drv; in __device_release_driver() local
523 drv = dev->driver; in __device_release_driver()
524 if (drv) { in __device_release_driver()
538 else if (drv->remove) in __device_release_driver()
539 drv->remove(dev); in __device_release_driver()
579 void driver_detach(struct device_driver *drv) in driver_detach() argument
585 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
586 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
587 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
590 dev_prv = list_entry(drv->p->klist_devices.k_list.prev, in driver_detach()
595 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
600 if (dev->driver == drv) in driver_detach()