Lines Matching defs:drv

858  * @drv: platform driver structure
861 int __platform_driver_register(struct platform_driver *drv,
864 drv->driver.owner = owner;
865 drv->driver.bus = &platform_bus_type;
867 return driver_register(&drv->driver);
873 * @drv: platform driver structure
875 void platform_driver_unregister(struct platform_driver *drv)
877 driver_unregister(&drv->driver);
895 * @drv: platform driver structure
913 int __init_or_module __platform_driver_probe(struct platform_driver *drv,
918 if (drv->driver.probe_type == PROBE_PREFER_ASYNCHRONOUS) {
920 drv->driver.name, __func__);
929 drv->driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
935 drv->prevent_deferred_probe = true;
938 drv->driver.suppress_bind_attrs = true;
941 drv->probe = probe;
942 retval = __platform_driver_register(drv, module);
947 drv->probe = platform_probe_fail;
952 if (!bus_for_each_dev(&platform_bus_type, NULL, &drv->driver, is_bound_to_driver)) {
954 platform_driver_unregister(drv);
1125 struct device_driver *drv = dev->driver;
1128 if (!drv)
1131 if (drv->pm) {
1132 if (drv->pm->suspend)
1133 ret = drv->pm->suspend(dev);
1143 struct device_driver *drv = dev->driver;
1146 if (!drv)
1149 if (drv->pm) {
1150 if (drv->pm->resume)
1151 ret = drv->pm->resume(dev);
1165 struct device_driver *drv = dev->driver;
1168 if (!drv)
1171 if (drv->pm) {
1172 if (drv->pm->freeze)
1173 ret = drv->pm->freeze(dev);
1183 struct device_driver *drv = dev->driver;
1186 if (!drv)
1189 if (drv->pm) {
1190 if (drv->pm->thaw)
1191 ret = drv->pm->thaw(dev);
1201 struct device_driver *drv = dev->driver;
1204 if (!drv)
1207 if (drv->pm) {
1208 if (drv->pm->poweroff)
1209 ret = drv->pm->poweroff(dev);
1219 struct device_driver *drv = dev->driver;
1222 if (!drv)
1225 if (drv->pm) {
1226 if (drv->pm->restore)
1227 ret = drv->pm->restore(dev);
1325 * @drv: driver.
1335 static int platform_match(struct device *dev, struct device_driver *drv)
1338 struct platform_driver *pdrv = to_platform_driver(drv);
1342 return !strcmp(pdev->driver_override, drv->name);
1345 if (of_driver_match_device(dev, drv))
1349 if (acpi_driver_match_device(dev, drv))
1357 return (strcmp(pdev->name, drv->name) == 0);
1381 struct platform_driver *drv = to_platform_driver(_dev->driver);
1392 if (unlikely(drv->probe == platform_probe_fail))
1403 if (drv->probe) {
1404 ret = drv->probe(dev);
1410 if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) {
1420 struct platform_driver *drv = to_platform_driver(_dev->driver);
1423 if (drv->remove_new) {
1424 drv->remove_new(dev);
1425 } else if (drv->remove) {
1426 int ret = drv->remove(dev);
1437 struct platform_driver *drv;
1442 drv = to_platform_driver(_dev->driver);
1443 if (drv->shutdown)
1444 drv->shutdown(dev);
1449 struct platform_driver *drv = to_platform_driver(dev->driver);
1460 if (ret || drv->driver_managed_dma)
1472 struct platform_driver *drv = to_platform_driver(dev->driver);
1474 if (!drv->driver_managed_dma)
1497 static inline int __platform_match(struct device *dev, const void *drv)
1499 return platform_match(dev, (struct device_driver *)drv);
1506 * @drv: The device driver to look for.
1509 const struct device_driver *drv)
1511 return bus_find_device(&platform_bus_type, start, drv,