- for (l = session->devices; l; l = l->next) {
- device = l->data;
- /* Check for device != NULL. */
- if (device->plugin) {
- if (device->plugin->stop_acquisition)
- device->plugin->stop_acquisition(device->plugin_index, device);
- if (device->plugin->cleanup)
- device->plugin->cleanup();
+ for (l = session->devs; l; l = l->next) {
+ dev = l->data;
+ /* Check for dev != NULL. */
+ if (dev->driver) {
+ if (dev->driver->dev_acquisition_stop)
+ dev->driver->dev_acquisition_stop(dev->driver_index, dev);
+ if (dev->driver->cleanup)
+ dev->driver->cleanup();