Messages in this thread Patch in this message | | | Date | Mon, 27 Sep 1999 12:01:47 -0400 (EDT) | From | ani joshi <> | Subject | PATCH: serial patch for PPC |
| |
Adding serial support for machines that don't have any rs ports causes a panic [panic("Couldn't register serial driver\n");], this causes a problem with making "common" PowerPC kernels, because prep/chrp do have these (right?) and PowerMacs do not. Below is a proposed patch to fix this problem, should this be the right way to get around the panic? also, i moved show_serial_version() to *after* the driver has been registered, which sounded to me like the proper way.
please cc me to any replies as i do not subsribe to this ilst, thanks!
ani
--- linux.orig/drivers/char/serial.c Mon Sep 27 08:45:05 1999 +++ linux/drivers/char/serial.c Mon Sep 27 08:47:50 1999 @@ -3890,7 +3890,6 @@ rs_table[i].irq = 0; } #endif - show_serial_version();
/* Initialize the tty_driver structure */
@@ -3952,10 +3951,26 @@ #endif
if (tty_register_driver(&serial_driver)) +#if defined(CONFIG_PPC) + { + printk("Couldn't register serial driver\n"); + return -1; + } +#else panic("Couldn't register serial driver\n"); +#endif if (tty_register_driver(&callout_driver)) +#if defined(CONFIG_PPC) + { + printk("Couldn't register callout driver\n"); + return -1; + } +#else panic("Couldn't register callout driver\n"); +#endif
+ show_serial_version(); + for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) { state->magic = SSTATE_MAGIC; state->line = i;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |