forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/goldfish.c
....@@ -151,7 +151,7 @@
151151 address = (unsigned long)(void *)buf;
152152 goldfish_tty_rw(qtty, address, count, 0);
153153
154
- tty_schedule_flip(&qtty->port);
154
+ tty_flip_buffer_push(&qtty->port);
155155 return IRQ_HANDLED;
156156 }
157157
....@@ -407,6 +407,7 @@
407407 err_tty_register_device_failed:
408408 free_irq(irq, qtty);
409409 err_dec_line_count:
410
+ tty_port_destroy(&qtty->port);
410411 goldfish_tty_current_line_count--;
411412 if (goldfish_tty_current_line_count == 0)
412413 goldfish_tty_delete_driver();
....@@ -427,7 +428,8 @@
427428 tty_unregister_device(goldfish_tty_driver, qtty->console.index);
428429 iounmap(qtty->base);
429430 qtty->base = NULL;
430
- free_irq(qtty->irq, pdev);
431
+ free_irq(qtty->irq, qtty);
432
+ tty_port_destroy(&qtty->port);
431433 goldfish_tty_current_line_count--;
432434 if (goldfish_tty_current_line_count == 0)
433435 goldfish_tty_delete_driver();