On Thu, Sep 26, 2002 at 10:05:16PM +0200, Marek Michalkiewicz wrote: > below is a patch that moves parport_serial.c from drivers/parport/ > to drivers/char/ - this fixes the wrong link order when the drivers > are compiled into the kernel. What was wrong with the original, much smaller patch that you sent me previously (below)? I'm happy to accept whichever patch is the better. Tim. */ 2002-08-28 Marek Michalkiewicz [sent 2002-08-28] * drivers/char/serial.c (register_serial): Call rs_init() if it hasn't already been called. For parport_serial.c. --- linux/drivers/char/serial.c.init_order 2002-08-28 20:55:10.000000000 +0100 +++ linux/drivers/char/serial.c 2002-08-28 21:00:24.000000000 +0100 @@ -254,6 +254,7 @@ static struct tty_driver serial_driver, callout_driver; static int serial_refcount; +static int serial_initialized; static struct timer_list serial_timer; @@ -5385,6 +5386,10 @@ int i; struct serial_state * state; + if (serial_initialized) + return; + serial_initialized++; + init_bh(SERIAL_BH, do_serial_bh); init_timer(&serial_timer); serial_timer.function = rs_timer; @@ -5603,6 +5608,11 @@ struct async_struct *info; unsigned long port; + if (!serial_initialized) { + printk("register_serial(): calling rs_init()\n"); + rs_init(); + } + port = req->port; if (HIGH_BITS_OFFSET) port += (unsigned long) req->port_high << HIGH_BITS_OFFSET;