Commit 4f542e3d authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Linus Torvalds

pps: claim parallel port exclusively

Both pps_parport and pps_gen_parport are written in a way that they
can't share a port with any other driver.  This can result in locking up
the process that loads modules or even the whole kernel if the modules
are compiled in.  Use PARPORT_FLAG_EXCL to indicate this.
Signed-off-by: default avatarAlexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a783ac44
...@@ -163,7 +163,7 @@ static void parport_attach(struct parport *port) ...@@ -163,7 +163,7 @@ static void parport_attach(struct parport *port)
} }
device->pardev = parport_register_device(port, KBUILD_MODNAME, device->pardev = parport_register_device(port, KBUILD_MODNAME,
NULL, NULL, parport_irq, 0, device); NULL, NULL, parport_irq, PARPORT_FLAG_EXCL, device);
if (!device->pardev) { if (!device->pardev) {
pr_err("couldn't register with %s\n", port->name); pr_err("couldn't register with %s\n", port->name);
goto err_free; goto err_free;
......
...@@ -198,7 +198,7 @@ static void parport_attach(struct parport *port) ...@@ -198,7 +198,7 @@ static void parport_attach(struct parport *port)
} }
device.pardev = parport_register_device(port, KBUILD_MODNAME, device.pardev = parport_register_device(port, KBUILD_MODNAME,
NULL, NULL, NULL, 0, &device); NULL, NULL, NULL, PARPORT_FLAG_EXCL, &device);
if (!device.pardev) { if (!device.pardev) {
pr_err("couldn't register with %s\n", port->name); pr_err("couldn't register with %s\n", port->name);
return; return;
......
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