Lines Matching refs:index
88 * This value is used to assign a tty->index value to a hvc_struct based
99 static struct hvc_struct *hvc_get_by_index(int index)
108 if (hp->index == index) {
143 int r, donecr = 0, index = co->index;
146 if (index >= MAX_NR_HVC_CONSOLES)
150 if (vtermnos[index] == -1)
164 r = cons_ops[index]->put_chars(vtermnos[index], c, i);
177 static struct tty_driver *hvc_console_device(struct console *c, int *index)
179 if (vtermnos[c->index] == -1)
182 *index = c->index;
188 if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
191 if (vtermnos[co->index] == -1)
203 .index = -1,
210 * -- index will remain -1
212 * -- index will be set to 0, then we will fail setup.
214 * -- index will be set to user specified driver, and we will fail
251 int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
255 if (index < 0 || index >= MAX_NR_HVC_CONSOLES)
258 if (vtermnos[index] != -1)
261 /* make sure no no tty has been registered in this index */
262 hp = hvc_get_by_index(index);
268 vtermnos[index] = vtermno;
269 cons_ops[index] = ops;
271 /* reserve all indices up to and including this index */
272 if (last_hvc < index)
273 last_hvc = index;
275 /* if this index is what the user requested, then register
279 if (index == hvc_console.index)
310 if (!(hp = hvc_get_by_index(tty->index)))
644 if (hp->index == hvc_console.index) {
790 * find index to use:
802 hp->index = i;
819 if (hp->index < MAX_NR_HVC_CONSOLES)
820 vtermnos[hp->index] = -1;