[PATCH] 2.6.3 fix 8250_pnp resource allocation

From: Mark Hindley
Date: Sat Feb 21 2004 - 09:32:12 EST


Hi,

Patch below to ensure that 8250_pnp sets necessary flags so that 8250
driver will reserve ioports.

Before, I was logging errors like

Feb 20 08:42:37 titan kernel: Trying to free nonexistent resource <000003e8-000003ef>

on module unload.

Mark


diff -u ../linux-2.6.3/drivers/serial/8250_pnp.c drivers/serial/8250_pnp.c
--- ../linux-2.6.3/drivers/serial/8250_pnp.c Sat Feb 21 12:18:33 2004
+++ drivers/serial/8250_pnp.c Sat Feb 21 14:18:38 2004
@@ -21,8 +21,10 @@
#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/kernel.h>
+#include <linux/tty.h>
#include <linux/serial.h>
#include <linux/serialP.h>
+#include <linux/serial_core.h>

#include <asm/bitops.h>
#include <asm/byteorder.h>
@@ -408,7 +410,7 @@
serial_req.port, serial_req.irq, serial_req.io_type);
#endif

- serial_req.flags = ASYNC_SKIP_TEST | ASYNC_AUTOPROBE;
+ serial_req.flags = UPF_SKIP_TEST | UPF_AUTOPROBE | UPF_RESOURCES;
serial_req.baud_base = 115200;
line = register_serial(&serial_req);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/