Lines Matching refs:drv

222 	const char *drv = dev_driver_string(dev);  in device_set_deferred_probe_reason()  local
227 dev->p->deferred_probe_reason = kasprintf(GFP_KERNEL, "%s: %pV", drv, vaf); in device_set_deferred_probe_reason()
435 struct device_driver *drv = dev->driver; in driver_sysfs_remove() local
437 if (drv) { in driver_sysfs_remove()
438 if (drv->coredump) in driver_sysfs_remove()
440 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove()
497 static int really_probe(struct device *dev, struct device_driver *drv) in really_probe() argument
502 !drv->suppress_bind_attrs; in really_probe()
510 dev_dbg(dev, "Driver %s force probe deferral\n", drv->name); in really_probe()
523 drv->bus->name, __func__, drv->name, dev_name(dev)); in really_probe()
531 dev->driver = drv; in really_probe()
561 } else if (drv->probe) { in really_probe()
562 ret = drv->probe(dev); in really_probe()
567 ret = device_add_groups(dev, drv->dev_groups); in really_probe()
585 device_remove_groups(dev, drv->dev_groups); in really_probe()
589 else if (drv->remove) in really_probe()
590 drv->remove(dev); in really_probe()
614 drv->bus->name, __func__, dev_name(dev), drv->name); in really_probe()
618 device_remove_groups(dev, drv->dev_groups); in really_probe()
622 else if (drv->remove) in really_probe()
623 drv->remove(dev); in really_probe()
645 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in really_probe()
651 drv->name, dev_name(dev), ret); in really_probe()
656 drv->name, dev_name(dev), ret); in really_probe()
672 static int really_probe_debug(struct device *dev, struct device_driver *drv) in really_probe_debug() argument
678 ret = really_probe(dev, drv); in really_probe_debug()
729 int driver_probe_device(struct device_driver *drv, struct device *dev) in driver_probe_device() argument
737 drv->bus->name, __func__, dev_name(dev), drv->name); in driver_probe_device()
745 ret = really_probe_debug(dev, drv); in driver_probe_device()
747 ret = really_probe(dev, drv); in driver_probe_device()
773 bool driver_allows_async_probing(struct device_driver *drv) in driver_allows_async_probing() argument
775 switch (drv->probe_type) { in driver_allows_async_probing()
783 if (cmdline_requested_async_probing(drv->name)) in driver_allows_async_probing()
786 if (module_requested_async_probing(drv->owner)) in driver_allows_async_probing()
826 static int __device_attach_driver(struct device_driver *drv, void *_data) in __device_attach_driver() argument
833 ret = driver_match_device(drv, dev); in __device_attach_driver()
850 async_allowed = driver_allows_async_probing(drv); in __device_attach_driver()
858 return driver_probe_device(drv, dev); in __device_attach_driver()
1019 int device_driver_attach(struct device_driver *drv, struct device *dev) in device_driver_attach() argument
1030 ret = driver_probe_device(drv, dev); in device_driver_attach()
1040 struct device_driver *drv; in __driver_attach_async_helper() local
1045 drv = dev->p->async_driver; in __driver_attach_async_helper()
1052 ret = driver_probe_device(drv, dev); in __driver_attach_async_helper()
1056 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret); in __driver_attach_async_helper()
1063 struct device_driver *drv = data; in __driver_attach() local
1077 ret = driver_match_device(drv, dev); in __driver_attach()
1094 if (driver_allows_async_probing(drv)) { in __driver_attach()
1102 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name); in __driver_attach()
1106 dev->p->async_driver = drv; in __driver_attach()
1115 device_driver_attach(drv, dev); in __driver_attach()
1129 int driver_attach(struct device_driver *drv) in driver_attach() argument
1131 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); in driver_attach()
1141 struct device_driver *drv; in __device_release_driver() local
1143 drv = dev->driver; in __device_release_driver()
1144 if (drv) { in __device_release_driver()
1158 if (dev->driver != drv) { in __device_release_driver()
1174 device_remove_groups(dev, drv->dev_groups); in __device_release_driver()
1178 else if (drv->remove) in __device_release_driver()
1179 drv->remove(dev); in __device_release_driver()
1206 struct device_driver *drv, in device_release_driver_internal() argument
1211 if (!drv || drv == dev->driver) in device_release_driver_internal()
1255 void driver_detach(struct device_driver *drv) in driver_detach() argument
1260 if (driver_allows_async_probing(drv)) in driver_detach()
1264 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
1265 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
1266 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1269 dev_prv = list_last_entry(&drv->p->klist_devices.k_list, in driver_detach()
1274 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1275 device_release_driver_internal(dev, drv, dev->parent); in driver_detach()