diff -Naru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c --- a/drivers/serial/pmac_zilog.c 2005-04-14 03:20:41 -07:00 +++ b/drivers/serial/pmac_zilog.c 2005-04-14 03:20:41 -07:00 @@ -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 # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/29 07:41:23-08:00 benh@kernel.crashing.org # [PATCH] fix oops at pmac_zilog rmmod'ing # # From: Colin Leroy # # 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. # # drivers/serial/pmac_zilog.c # 2004/03/29 00:42:07-08:00 benh@kernel.crashing.org +2 -3 # fix oops at pmac_zilog rmmod'ing #