Lines Matching refs:drv

42 static int macio_bus_match(struct device *dev, struct device_driver *drv)   in macio_bus_match()  argument
44 const struct of_device_id * matches = drv->of_match_table; in macio_bus_match()
75 struct macio_driver *drv; in macio_device_probe() local
79 drv = to_macio_driver(dev->driver); in macio_device_probe()
82 if (!drv->probe) in macio_device_probe()
87 match = of_match_device(drv->driver.of_match_table, dev); in macio_device_probe()
89 error = drv->probe(macio_dev, match); in macio_device_probe()
99 struct macio_driver * drv = to_macio_driver(dev->driver); in macio_device_remove() local
101 if (dev->driver && drv->remove) in macio_device_remove()
102 drv->remove(macio_dev); in macio_device_remove()
111 struct macio_driver * drv = to_macio_driver(dev->driver); in macio_device_shutdown() local
113 if (dev->driver && drv->shutdown) in macio_device_shutdown()
114 drv->shutdown(macio_dev); in macio_device_shutdown()
120 struct macio_driver * drv = to_macio_driver(dev->driver); in macio_device_suspend() local
122 if (dev->driver && drv->suspend) in macio_device_suspend()
123 return drv->suspend(macio_dev, state); in macio_device_suspend()
130 struct macio_driver * drv = to_macio_driver(dev->driver); in macio_device_resume() local
132 if (dev->driver && drv->resume) in macio_device_resume()
133 return drv->resume(macio_dev); in macio_device_resume()
527 int macio_register_driver(struct macio_driver *drv) in macio_register_driver() argument
530 drv->driver.bus = &macio_bus_type; in macio_register_driver()
533 return driver_register(&drv->driver); in macio_register_driver()
540 void macio_unregister_driver(struct macio_driver *drv) in macio_unregister_driver() argument
542 driver_unregister(&drv->driver); in macio_unregister_driver()