Lines Matching defs:drv
229 const char *drv = dev_driver_string(dev);
234 reason = kasprintf(GFP_KERNEL, "%s: %pV", drv, vaf);
470 struct device_driver *drv = dev->driver;
472 if (drv) {
473 if (drv->coredump)
475 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj));
572 static int call_driver_probe(struct device *dev, struct device_driver *drv)
578 else if (drv->probe)
579 ret = drv->probe(dev);
586 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
591 drv->name, dev_name(dev), ret);
596 drv->name, dev_name(dev), ret);
603 static int really_probe(struct device *dev, struct device_driver *drv)
606 !drv->suppress_bind_attrs;
615 dev_dbg(dev, "Driver %s force probe deferral\n", drv->name);
624 drv->bus->name, __func__, drv->name, dev_name(dev));
632 dev->driver = drv;
658 ret = call_driver_probe(dev, drv);
677 ret = device_add_groups(dev, drv->dev_groups);
710 drv->bus->name, __func__, dev_name(dev), drv->name);
732 static int really_probe_debug(struct device *dev, struct device_driver *drv)
738 ret = really_probe(dev, drv);
779 static int __driver_probe_device(struct device_driver *drv, struct device *dev)
790 drv->bus->name, __func__, dev_name(dev), drv->name);
798 ret = really_probe_debug(dev, drv);
800 ret = really_probe(dev, drv);
812 * @drv: driver to bind a device to
824 static int driver_probe_device(struct device_driver *drv, struct device *dev)
830 ret = __driver_probe_device(drv, dev);
868 static bool driver_allows_async_probing(struct device_driver *drv)
870 switch (drv->probe_type) {
878 if (cmdline_requested_async_probing(drv->name))
881 if (module_requested_async_probing(drv->owner))
921 static int __device_attach_driver(struct device_driver *drv, void *_data)
928 ret = driver_match_device(drv, dev);
946 async_allowed = driver_allows_async_probing(drv);
958 ret = driver_probe_device(drv, dev);
1083 * __device_driver_lock - acquire locks needed to manipulate dev->drv
1087 * This function will take the required locks for manipulating dev->drv.
1099 * __device_driver_unlock - release locks needed to manipulate dev->drv
1103 * This function will release the required locks for manipulating dev->drv.
1116 * @drv: Driver to attach
1122 int device_driver_attach(struct device_driver *drv, struct device *dev)
1127 ret = __driver_probe_device(drv, dev);
1142 struct device_driver *drv;
1146 drv = dev->p->async_driver;
1148 ret = driver_probe_device(drv, dev);
1151 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret);
1158 struct device_driver *drv = data;
1172 ret = driver_match_device(drv, dev);
1194 if (driver_allows_async_probing(drv)) {
1202 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name);
1206 dev->p->async_driver = drv;
1216 driver_probe_device(drv, dev);
1224 * @drv: driver.
1231 int driver_attach(struct device_driver *drv)
1233 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);
1243 struct device_driver *drv;
1245 drv = dev->driver;
1246 if (drv) {
1260 if (dev->driver != drv) {
1289 struct device_driver *drv,
1294 if (!drv || drv == dev->driver)
1336 * @drv: driver.
1338 void driver_detach(struct device_driver *drv)
1343 if (driver_allows_async_probing(drv))
1347 spin_lock(&drv->p->klist_devices.k_lock);
1348 if (list_empty(&drv->p->klist_devices.k_list)) {
1349 spin_unlock(&drv->p->klist_devices.k_lock);
1352 dev_prv = list_last_entry(&drv->p->klist_devices.k_list,
1357 spin_unlock(&drv->p->klist_devices.k_lock);
1358 device_release_driver_internal(dev, drv, dev->parent);