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()
319 } else if (drv->probe) { in really_probe()
320 ret = drv->probe(dev); in really_probe()
333 drv->bus->name, __func__, dev_name(dev), drv->name); in really_probe()
347 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in really_probe()
356 drv->name, dev_name(dev), ret); in really_probe()
362 drv->name, dev_name(dev), ret); in really_probe()
415 int driver_probe_device(struct device_driver *drv, struct device *dev) in driver_probe_device() argument
423 drv->bus->name, __func__, dev_name(dev), drv->name); in driver_probe_device()
429 ret = really_probe(dev, drv); in driver_probe_device()
438 bool driver_allows_async_probing(struct device_driver *drv) in driver_allows_async_probing() argument
440 switch (drv->probe_type) { in driver_allows_async_probing()
448 if (module_requested_async_probing(drv->owner)) in driver_allows_async_probing()
488 static int __device_attach_driver(struct device_driver *drv, void *_data) in __device_attach_driver() argument
503 if (!driver_match_device(drv, dev)) in __device_attach_driver()
506 async_allowed = driver_allows_async_probing(drv); in __device_attach_driver()
514 return driver_probe_device(drv, dev); in __device_attach_driver()
623 struct device_driver *drv = data; in __driver_attach() local
635 if (!driver_match_device(drv, dev)) in __driver_attach()
642 driver_probe_device(drv, dev); in __driver_attach()
659 int driver_attach(struct device_driver *drv) in driver_attach() argument
661 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); in driver_attach()
671 struct device_driver *drv; in __device_release_driver() local
673 drv = dev->driver; in __device_release_driver()
674 if (drv) { in __device_release_driver()
675 if (driver_allows_async_probing(drv)) in __device_release_driver()
691 else if (drv->remove) in __device_release_driver()
692 drv->remove(dev); in __device_release_driver()
732 void driver_detach(struct device_driver *drv) in driver_detach() argument
738 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
739 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
740 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
743 dev_prv = list_entry(drv->p->klist_devices.k_list.prev, in driver_detach()
748 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
753 if (dev->driver == drv) in driver_detach()