Lines Matching defs:drv
37 static int macio_bus_match(struct device *dev, struct device_driver *drv)
39 const struct of_device_id * matches = drv->of_match_table;
70 struct macio_driver *drv;
74 drv = to_macio_driver(dev->driver);
77 if (!drv->probe)
82 match = of_match_device(drv->driver.of_match_table, dev);
84 error = drv->probe(macio_dev, match);
94 struct macio_driver * drv = to_macio_driver(dev->driver);
96 if (dev->driver && drv->remove)
97 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);
521 * @drv: pointer to the driver definition structure
523 int macio_register_driver(struct macio_driver *drv)
526 drv->driver.bus = &macio_bus_type;
529 return driver_register(&drv->driver);
534 * @drv: pointer to the driver definition structure
536 void macio_unregister_driver(struct macio_driver *drv)
538 driver_unregister(&drv->driver);