Lines Matching refs:drv

396 	struct device_driver *drv = dev->driver;  in driver_sysfs_remove()  local
398 if (drv) { in driver_sysfs_remove()
399 if (drv->coredump) in driver_sysfs_remove()
401 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove()
446 static int really_probe(struct device *dev, struct device_driver *drv) in really_probe() argument
451 !drv->suppress_bind_attrs; in really_probe()
459 dev_dbg(dev, "Driver %s force probe deferral\n", drv->name); in really_probe()
472 drv->bus->name, __func__, drv->name, dev_name(dev)); in really_probe()
476 dev->driver = drv; in really_probe()
503 } else if (drv->probe) { in really_probe()
504 ret = drv->probe(dev); in really_probe()
514 else if (drv->remove) in really_probe()
515 drv->remove(dev); in really_probe()
536 drv->bus->name, __func__, dev_name(dev), drv->name); in really_probe()
559 dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name); in really_probe()
565 drv->name, dev_name(dev), ret); in really_probe()
571 drv->name, dev_name(dev), ret); in really_probe()
587 static int really_probe_debug(struct device *dev, struct device_driver *drv) in really_probe_debug() argument
593 ret = really_probe(dev, drv); in really_probe_debug()
644 int driver_probe_device(struct device_driver *drv, struct device *dev) in driver_probe_device() argument
652 drv->bus->name, __func__, dev_name(dev), drv->name); in driver_probe_device()
660 ret = really_probe_debug(dev, drv); in driver_probe_device()
662 ret = really_probe(dev, drv); in driver_probe_device()
672 bool driver_allows_async_probing(struct device_driver *drv) in driver_allows_async_probing() argument
674 switch (drv->probe_type) { in driver_allows_async_probing()
682 if (module_requested_async_probing(drv->owner)) in driver_allows_async_probing()
722 static int __device_attach_driver(struct device_driver *drv, void *_data) in __device_attach_driver() argument
738 ret = driver_match_device(drv, dev); in __device_attach_driver()
750 async_allowed = driver_allows_async_probing(drv); in __device_attach_driver()
758 return driver_probe_device(drv, dev); in __device_attach_driver()
867 struct device_driver *drv = data; in __driver_attach() local
880 ret = driver_match_device(drv, dev); in __driver_attach()
896 driver_probe_device(drv, dev); in __driver_attach()
913 int driver_attach(struct device_driver *drv) in driver_attach() argument
915 return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); in driver_attach()
925 struct device_driver *drv; in __device_release_driver() local
927 drv = dev->driver; in __device_release_driver()
928 if (drv) { in __device_release_driver()
929 if (driver_allows_async_probing(drv)) in __device_release_driver()
947 if (dev->driver != drv) in __device_release_driver()
965 else if (drv->remove) in __device_release_driver()
966 drv->remove(dev); in __device_release_driver()
991 struct device_driver *drv, in device_release_driver_internal() argument
998 if (!drv || drv == dev->driver) in device_release_driver_internal()
1032 void driver_detach(struct device_driver *drv) in driver_detach() argument
1038 spin_lock(&drv->p->klist_devices.k_lock); in driver_detach()
1039 if (list_empty(&drv->p->klist_devices.k_list)) { in driver_detach()
1040 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1043 dev_prv = list_entry(drv->p->klist_devices.k_list.prev, in driver_detach()
1048 spin_unlock(&drv->p->klist_devices.k_lock); in driver_detach()
1049 device_release_driver_internal(dev, drv, dev->parent); in driver_detach()