tty: remove tty event queues

This commit is contained in:
2023-06-11 19:00:55 +01:00
parent a7c28e983c
commit cdb9fef36c
4 changed files with 13 additions and 57 deletions

View File

@@ -55,21 +55,13 @@ struct device *tty_device_create(void)
return NULL;
}
kern_status_t status = ringbuffer_init(&tty_dev->tty_events, TTY_EVENT_QUEUE_SIZE * sizeof(struct input_event));
kern_status_t status = ringbuffer_init(&tty_dev->tty_input, TTY_INPUT_QUEUE_SIZE * sizeof(char));
if (status != KERN_OK) {
kfree(tty_dev);
object_deref(char_device_object(cdev));
return NULL;
}
status = ringbuffer_init(&tty_dev->tty_input, TTY_INPUT_QUEUE_SIZE * sizeof(char));
if (status != KERN_OK) {
ringbuffer_deinit(&tty_dev->tty_events);
kfree(tty_dev);
object_deref(char_device_object(cdev));
return NULL;
}
tty_dev->tty_ldisc = tty_default_line_discipline();
cdev->c_ops = &tty_ops;