fix oops at pmac_zilog rmmod'ing
PATCH 1/1 fix oops at pmac_zilog rmmod'ing
Hi,
rmmod'ing pmac_zilog currently oopses because uart_unregister_driver(), which nullifies drv->tty_driver, is called before uart_remove_one_port(), which uses said drv->tty_driver.
The comment at top of uart_unregister_driver() specifically says we have to have removed all our ports
via uart_remove_one_port() before.
HTH,
Signature · 3 lines
Colin This message represents the official view of the voices in my head.
serial/pmac_zilog.c renamed from serial/pmac_zilog.c.orig +2 -3
@@ -1875,9 +1875,6 @@/* Get rid of macio-driver (detach from macio) */ macio_unregister_driver (&pmz_driver); -/* Unregister UART driver */ -uart_unregister_driver (&pmz_uart_reg); -for (i =0 ; i < pmz_ports_count; i++) {struct uart_pmac_port *uport = &pmz_ports[i];if (uport->node !=NULL ) {
@@ -1885,6 +1882,8 @@pmz_dispose_port (uport); } } +/* Unregister UART driver */ +uart_unregister_driver (&pmz_uart_reg); }#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE