Lines Matching refs:index

79  * This value is used to assign a tty->index value to a hvc_struct based
90 static struct hvc_struct *hvc_get_by_index(int index)
99 if (hp->index == index) {
156 int r, donecr = 0, index = co->index;
159 if (index >= MAX_NR_HVC_CONSOLES)
163 if (vtermnos[index] == -1)
177 r = cons_ops[index]->put_chars(vtermnos[index], c, i);
184 hvc_console_flush(cons_ops[index],
185 vtermnos[index]);
194 hvc_console_flush(cons_ops[index], vtermnos[index]);
197 static struct tty_driver *hvc_console_device(struct console *c, int *index)
199 if (vtermnos[c->index] == -1)
202 *index = c->index;
208 if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
211 if (vtermnos[co->index] == -1)
223 .index = -1,
230 * -- index will remain -1
232 * -- index will be set to 0, then we will fail setup.
234 * -- index will be set to user specified driver, and we will fail
265 static void hvc_check_console(int index)
271 /* If this index is what the user requested, then register
275 if (index == hvc_console.index)
285 int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
289 if (index < 0 || index >= MAX_NR_HVC_CONSOLES)
292 if (vtermnos[index] != -1)
295 /* make sure no tty has been registered in this index */
296 hp = hvc_get_by_index(index);
302 vtermnos[index] = vtermno;
303 cons_ops[index] = ops;
306 hvc_check_console(index);
331 hp = hvc_get_by_index(tty->index);
705 if (hp->index == hvc_console.index) {
944 * find index to use:
963 hp->index = i;
988 if (hp->index < MAX_NR_HVC_CONSOLES) {
989 vtermnos[hp->index] = -1;
990 cons_ops[hp->index] = NULL;