Lines Matching defs:from
76 static void ivtv_queue_move_buf(struct ivtv_stream *s, struct ivtv_queue *from,
79 struct ivtv_buffer *buf = list_entry(from->list.next, struct ivtv_buffer, list);
81 list_move_tail(from->list.next, &to->list);
82 from->buffers--;
83 from->length -= s->buf_size;
84 from->bytesused -= buf->bytesused - buf->readpos;
93 /* Move 'needed_bytes' worth of buffers from queue 'from' into queue 'to'.
94 If 'needed_bytes' == 0, then move all buffers from 'from' into 'to'.
95 If 'steal' != NULL, then buffers may also taken from that queue if
96 needed, but only if 'from' is the free queue.
99 also cleared if buffers need to be taken from the 'steal' queue and
100 the 'from' queue is the free queue.
102 When 'from' is q_free, then needed_bytes is compared to the total
108 buffers where obtained from the 'from' list and if non-zero then
110 int ivtv_queue_move(struct ivtv_stream *s, struct ivtv_queue *from, struct ivtv_queue *steal,
115 int from_free = from == &s->q_free;
122 needed_bytes = from->length;
125 bytes_available = from_free ? from->length : from->bytesused;
136 /* move buffers from the tail of the 'steal' queue to the tail of the
137 'from' queue. Always copy all the buffers with the same dma_xfer_cnt
141 list_move_tail(steal->list.prev, &from->list);
147 from->buffers++;
148 from->length += s->buf_size;
159 ivtv_queue_move_buf(s, from, to, 1);
166 ivtv_queue_move_buf(s, from, to, to_free);