Lines Matching defs:drv
136 struct visor_driver *drv;
141 drv = to_visor_driver(xdrv);
143 if (!drv->channel_types)
145 for (i = 0; !guid_is_null(&drv->channel_types[i].guid); i++)
146 if (guid_equal(&drv->channel_types[i].guid, channel_type) &&
149 &drv->channel_types[i].guid,
150 (char *)drv->channel_types[i].name,
151 drv->channel_types[i].min_bytes,
152 drv->channel_types[i].version,
296 struct visor_driver *drv = NULL;
303 drv = to_visor_driver(xdrv);
304 return sprintf(buf, "%s\n", drv->channel_types[i - 1].name);
490 struct visor_driver *drv = to_visor_driver(dev->device.driver);
492 drv->channel_interrupt(dev);
532 struct visor_driver *drv = to_visor_driver(xdev->driver);
536 drv->remove(dev);
545 * @drv: the driver to unregister
550 void visorbus_unregister_visor_driver(struct visor_driver *drv)
552 driver_unregister(&drv->driver);
604 struct visor_driver *drv = to_visor_driver(dev->device.driver);
606 if (!drv->channel_interrupt) {
675 * ->for each driver drv registered on the bus that dev is on
676 * if (dev.drv) ** device already has a driver **
679 * if (bus.match(dev,drv)) [visorbus_match]
680 * dev.drv = drv
681 * if (!drv.probe(dev)) [visordriver_probe_device]
682 * dev.drv = NULL
901 struct visor_driver *drv = to_visor_driver(xdev->driver);
906 err = drv->probe(dev);
922 * @drv: the driver to register
925 * caller MUST fill in the following fields within the #drv structure:
966 int visorbus_register_visor_driver(struct visor_driver *drv)
971 if (!drv->probe)
973 if (!drv->remove)
975 if (!drv->pause)
977 if (!drv->resume)
980 drv->driver.name = drv->name;
981 drv->driver.bus = &visorbus_type;
982 drv->driver.probe = visordriver_probe_device;
983 drv->driver.remove = visordriver_remove_device;
984 drv->driver.owner = drv->owner;
987 * bus_add_driver(drv)
988 * ->if (drv.bus) ** (bus_type) **
989 * driver_attach(drv)
990 * for each dev with bus type of drv.bus
991 * if (!dev.drv) ** no driver assigned yet **
992 * if (bus.match(dev,drv)) [visorbus_match]
993 * dev.drv = drv
994 * if (!drv.probe(dev)) [visordriver_probe_device]
995 * dev.drv = NULL
997 return driver_register(&drv->driver);
1142 struct visor_driver *drv;
1150 drv = to_visor_driver(dev->device.driver);
1153 err = drv->pause(dev, pause_state_change_complete);
1161 err = drv->resume(dev, resume_state_change_complete);