Lines Matching defs:drv
39 static int macio_bus_match(struct device *dev, struct device_driver *drv)
41 const struct of_device_id * matches = drv->of_match_table;
72 struct macio_driver *drv;
76 drv = to_macio_driver(dev->driver);
79 if (!drv->probe)
84 match = of_match_device(drv->driver.of_match_table, dev);
86 error = drv->probe(macio_dev, match);
96 struct macio_driver * drv = to_macio_driver(dev->driver);
98 if (dev->driver && drv->remove)
99 drv->remove(macio_dev);
106 struct macio_driver * drv = to_macio_driver(dev->driver);
108 if (dev->driver && drv->shutdown)
109 drv->shutdown(macio_dev);
115 struct macio_driver * drv = to_macio_driver(dev->driver);
117 if (dev->driver && drv->suspend)
118 return drv->suspend(macio_dev, state);
125 struct macio_driver * drv = to_macio_driver(dev->driver);
127 if (dev->driver && drv->resume)
128 return drv->resume(macio_dev);
526 * @drv: pointer to the driver definition structure
528 int macio_register_driver(struct macio_driver *drv)
531 drv->driver.bus = &macio_bus_type;
534 return driver_register(&drv->driver);
539 * @drv: pointer to the driver definition structure
541 void macio_unregister_driver(struct macio_driver *drv)
543 driver_unregister(&drv->driver);