if (con->device) { conststruct tty_driver *driver; int index;
/* * Take console_lock to serialize device() callback with * other console operations. For example, fg_console is * modified under console_lock when switching vt.
*/
console_lock();
driver = con->device(con, &index);
console_unlock();
if (driver) {
dev = MKDEV(driver->major, driver->minor_start);
dev += index;
}
}
for (a = 0; a < ARRAY_SIZE(con_flags); a++)
flags[a] = (con->flags & con_flags[a].flag) ?
con_flags[a].name : ' ';
flags[a] = 0;
/* * Hold the console_list_lock to guarantee safe traversal of the * console list. SRCU cannot be used because there is no * place to store the SRCU cookie.
*/
console_list_lock();
for_each_console(con) if (off++ == *pos) break;