-/**
- * TODO.
- *
- * @param device_index TODO.
- */
-static struct session_vdevice *get_vdevice_by_index(int device_index)
-{
- struct sr_device_instance *sdi;
- struct session_vdevice *vdevice;
-
- /* TODO: Sanity checks on device_index. */
-
- if (!(sdi = sr_get_device_instance(device_instances, device_index))) {
- sr_err("session driver: %s: device instance with device "
- "index %d was not found", __func__, device_index);
- return NULL;
- }
-
- /* TODO: Is sdi->priv == NULL valid? */
-
- vdevice = sdi->priv;
-
- return vdevice;
-}
-
-/**
- * TODO.
- *
- * @param fd TODO.
- * @param revents TODO.
- * @param session_data TODO.
- *
- * @return TODO.
- */
-static int feed_chunk(int fd, int revents, void *session_data)