Lines Matching refs:drv

228 	const char *drv = dev_driver_string(dev);  in device_set_deferred_probe_reason()  local
233 reason = kasprintf(GFP_KERNEL, "%s: %pV", drv, vaf); in device_set_deferred_probe_reason()
452 struct device_driver *drv = dev->driver; in driver_sysfs_remove() local
454 if (drv) { in driver_sysfs_remove()
455 if (drv->coredump) in driver_sysfs_remove()
457 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove()
510 static int call_driver_probe(struct device *dev, struct device_driver *drv) in call_driver_probe() argument
516 else if (drv->probe) in call_driver_probe()
517 ret = drv->probe(dev); in call_driver_probe()
524 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in call_driver_probe()
529 drv->name, dev_name(dev), ret); in call_driver_probe()
534 drv->name, dev_name(dev), ret); in call_driver_probe()
541 static int really_probe(struct device *dev, struct device_driver *drv) in really_probe() argument
544 !drv->suppress_bind_attrs; in really_probe()
553 dev_dbg(dev, "Driver %s force probe deferral\n", drv->name); in really_probe()
562 drv->bus->name, __func__, drv->name, dev_name(dev)); in really_probe()
570 dev->driver = drv; in really_probe()
596 ret = call_driver_probe(dev, drv); in really_probe()
606 ret = device_add_groups(dev, drv->dev_groups); in really_probe()
624 device_remove_groups(dev, drv->dev_groups); in really_probe()
628 else if (drv->remove) in really_probe()
629 drv->remove(dev); in really_probe()
649 drv->bus->name, __func__, dev_name(dev), drv->name); in really_probe()
653 device_remove_groups(dev, drv->dev_groups); in really_probe()
657 else if (drv->remove) in really_probe()
658 drv->remove(dev); in really_probe()
683 static int really_probe_debug(struct device *dev, struct device_driver *drv) in really_probe_debug() argument
689 ret = really_probe(dev, drv); in really_probe_debug()
730 static int __driver_probe_device(struct device_driver *drv, struct device *dev) in __driver_probe_device() argument
741 drv->bus->name, __func__, dev_name(dev), drv->name); in __driver_probe_device()
749 ret = really_probe_debug(dev, drv); in __driver_probe_device()
751 ret = really_probe(dev, drv); in __driver_probe_device()
775 static int driver_probe_device(struct device_driver *drv, struct device *dev) in driver_probe_device() argument
781 ret = __driver_probe_device(drv, dev); in driver_probe_device()
813 bool driver_allows_async_probing(struct device_driver *drv) in driver_allows_async_probing() argument
815 switch (drv->probe_type) { in driver_allows_async_probing()
823 if (cmdline_requested_async_probing(drv->name)) in driver_allows_async_probing()
826 if (module_requested_async_probing(drv->owner)) in driver_allows_async_probing()
866 static int __device_attach_driver(struct device_driver *drv, void *_data) in __device_attach_driver() argument
873 ret = driver_match_device(drv, dev); in __device_attach_driver()
886 async_allowed = driver_allows_async_probing(drv); in __device_attach_driver()
898 ret = driver_probe_device(drv, dev); in __device_attach_driver()
1059 int device_driver_attach(struct device_driver *drv, struct device *dev) in device_driver_attach() argument
1064 ret = __driver_probe_device(drv, dev); in device_driver_attach()
1079 struct device_driver *drv; in __driver_attach_async_helper() local
1083 drv = dev->p->async_driver; in __driver_attach_async_helper()
1084 ret = driver_probe_device(drv, dev); in __driver_attach_async_helper()
1087 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret); in __driver_attach_async_helper()
1094 struct device_driver *drv = data; in __driver_attach() local
1107 ret = driver_match_device(drv, dev); in __driver_attach()
1120 if (driver_allows_async_probing(drv)) { in __driver_attach()
1128 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name); in __driver_attach()
1132 dev->p->async_driver = drv; in __driver_attach()
1140 driver_probe_device(drv, dev); in __driver_attach()
1155 int driver_attach(struct device_driver *drv) in driver_attach() argument
1157 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); in driver_attach()
1167 struct device_driver *drv; in __device_release_driver() local
1169 drv = dev->driver; in __device_release_driver()
1170 if (drv) { in __device_release_driver()
1184 if (dev->driver != drv) { in __device_release_driver()
1200 device_remove_groups(dev, drv->dev_groups); in __device_release_driver()
1204 else if (drv->remove) in __device_release_driver()
1205 drv->remove(dev); in __device_release_driver()
1230 struct device_driver *drv, in device_release_driver_internal() argument
1235 if (!drv || drv == dev->driver) in device_release_driver_internal()
1279 void driver_detach(struct device_driver *drv) in driver_detach() argument
1284 if (driver_allows_async_probing(drv)) in driver_detach()
1288 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
1289 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
1290 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1293 dev_prv = list_last_entry(&drv->p->klist_devices.k_list, in driver_detach()
1298 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1299 device_release_driver_internal(dev, drv, dev->parent); in driver_detach()