Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexander Gordeev and committed by
Linus Torvalds
4f542e3d a783ac44

+2 -2
+1 -1
drivers/pps/clients/pps_parport.c
··· 163 163 } 164 164 165 165 device->pardev = parport_register_device(port, KBUILD_MODNAME, 166 - NULL, NULL, parport_irq, 0, device); 166 + NULL, NULL, parport_irq, PARPORT_FLAG_EXCL, device); 167 167 if (!device->pardev) { 168 168 pr_err("couldn't register with %s\n", port->name); 169 169 goto err_free;
+1 -1
drivers/pps/generators/pps_gen_parport.c
··· 198 198 } 199 199 200 200 device.pardev = parport_register_device(port, KBUILD_MODNAME, 201 - NULL, NULL, NULL, 0, &device); 201 + NULL, NULL, NULL, PARPORT_FLAG_EXCL, &device); 202 202 if (!device.pardev) { 203 203 pr_err("couldn't register with %s\n", port->name); 204 204 return;