Lines Matching refs:drv

230 	const char *drv = dev_driver_string(dev);  in device_set_deferred_probe_reason()  local
235 reason = kasprintf(GFP_KERNEL, "%s: %pV", drv, vaf); in device_set_deferred_probe_reason()
471 struct device_driver *drv = dev->driver; in driver_sysfs_remove() local
473 if (drv) { in driver_sysfs_remove()
474 if (drv->coredump) in driver_sysfs_remove()
476 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove()
574 static int call_driver_probe(struct device *dev, const struct device_driver *drv) in call_driver_probe() argument
580 else if (drv->probe) in call_driver_probe()
581 ret = drv->probe(dev); in call_driver_probe()
588 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in call_driver_probe()
593 drv->name, ret); in call_driver_probe()
598 drv->name, ret); in call_driver_probe()
605 static int really_probe(struct device *dev, const struct device_driver *drv) in really_probe() argument
608 !drv->suppress_bind_attrs; in really_probe()
617 dev_dbg(dev, "Driver %s force probe deferral\n", drv->name); in really_probe()
626 drv->bus->name, __func__, drv->name); in really_probe()
634 device_set_driver(dev, drv); in really_probe()
659 ret = call_driver_probe(dev, drv); in really_probe()
678 ret = device_add_groups(dev, drv->dev_groups); in really_probe()
711 drv->bus->name, __func__, drv->name); in really_probe()
733 static int really_probe_debug(struct device *dev, const struct device_driver *drv) in really_probe_debug() argument
739 ret = really_probe(dev, drv); in really_probe_debug()
780 static int __driver_probe_device(const struct device_driver *drv, struct device *dev) in __driver_probe_device() argument
791 drv->bus->name, __func__, drv->name); in __driver_probe_device()
799 ret = really_probe_debug(dev, drv); in __driver_probe_device()
801 ret = really_probe(dev, drv); in __driver_probe_device()
825 static int driver_probe_device(const struct device_driver *drv, struct device *dev) in driver_probe_device() argument
831 ret = __driver_probe_device(drv, dev); in driver_probe_device()
869 static bool driver_allows_async_probing(const struct device_driver *drv) in driver_allows_async_probing() argument
871 switch (drv->probe_type) { in driver_allows_async_probing()
879 if (cmdline_requested_async_probing(drv->name)) in driver_allows_async_probing()
882 if (module_requested_async_probing(drv->owner)) in driver_allows_async_probing()
922 static int __device_attach_driver(struct device_driver *drv, void *_data) in __device_attach_driver() argument
929 ret = driver_match_device(drv, dev); in __device_attach_driver()
947 async_allowed = driver_allows_async_probing(drv); in __device_attach_driver()
959 ret = driver_probe_device(drv, dev); in __device_attach_driver()
1123 int device_driver_attach(const struct device_driver *drv, struct device *dev) in device_driver_attach() argument
1128 ret = __driver_probe_device(drv, dev); in device_driver_attach()
1143 const struct device_driver *drv; in __driver_attach_async_helper() local
1147 drv = dev->p->async_driver; in __driver_attach_async_helper()
1149 ret = driver_probe_device(drv, dev); in __driver_attach_async_helper()
1152 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret); in __driver_attach_async_helper()
1159 const struct device_driver *drv = data; in __driver_attach() local
1173 ret = driver_match_device(drv, dev); in __driver_attach()
1195 if (driver_allows_async_probing(drv)) { in __driver_attach()
1203 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name); in __driver_attach()
1207 dev->p->async_driver = drv; in __driver_attach()
1217 driver_probe_device(drv, dev); in __driver_attach()
1232 int driver_attach(const struct device_driver *drv) in driver_attach() argument
1235 return bus_for_each_dev(drv->bus, NULL, (void *)drv, __driver_attach); in driver_attach()
1245 struct device_driver *drv; in __device_release_driver() local
1247 drv = dev->driver; in __device_release_driver()
1248 if (drv) { in __device_release_driver()
1262 if (dev->driver != drv) { in __device_release_driver()
1291 const struct device_driver *drv, in device_release_driver_internal() argument
1296 if (!drv || drv == dev->driver) in device_release_driver_internal()
1340 void driver_detach(const struct device_driver *drv) in driver_detach() argument
1345 if (driver_allows_async_probing(drv)) in driver_detach()
1349 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
1350 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
1351 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1354 dev_prv = list_last_entry(&drv->p->klist_devices.k_list, in driver_detach()
1359 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1360 device_release_driver_internal(dev, drv, dev->parent); in driver_detach()