Commit 6c4a6df3 authored by Mark Hindley's avatar Mark Hindley Committed by Russell King

[SERIAL] fix 8250_pnp resource allocation

Patch from: Mark Hindley

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.
parent da57b2aa
......@@ -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_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment