+ termport_cap = device_get_capability(chardev, TERMPORT_CAP);
+ if (termport_cap) {
+ terminal->tp_cap =
+ get_capability(termport_cap, struct termport_capability);
+
+ assert(terminal->tp_cap->cap_ops);
+ terminal->tp_cap->term = terminal;
+ }
+
+ tios_cap = new_capability_marker(TERMIOS_CAP);
+ device_grant_capability(tdev, tios_cap);
+