diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-25 18:07:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 19:50:00 -0500 |
commit | 4f542e3dd90a96ee0f8fcb8173cb4104f5f753e6 (patch) | |
tree | 1127d2abe1aa2a98ccf6d8a336f8dd68a285340e /drivers/pps | |
parent | a783ac4453405b579ab7732ba3c0efc07a4b7a61 (diff) |
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>
Diffstat (limited to 'drivers/pps')
-rw-r--r-- | drivers/pps/clients/pps_parport.c | 2 | ||||
-rw-r--r-- | drivers/pps/generators/pps_gen_parport.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c index 32221efd9ca9..c571d6dd8f61 100644 --- a/drivers/pps/clients/pps_parport.c +++ b/drivers/pps/clients/pps_parport.c | |||
@@ -163,7 +163,7 @@ static void parport_attach(struct parport *port) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | device->pardev = parport_register_device(port, KBUILD_MODNAME, | 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 | if (!device->pardev) { | 167 | if (!device->pardev) { |
168 | pr_err("couldn't register with %s\n", port->name); | 168 | pr_err("couldn't register with %s\n", port->name); |
169 | goto err_free; | 169 | goto err_free; |
diff --git a/drivers/pps/generators/pps_gen_parport.c b/drivers/pps/generators/pps_gen_parport.c index 5c32f8dacf56..b93af3ebb5ba 100644 --- a/drivers/pps/generators/pps_gen_parport.c +++ b/drivers/pps/generators/pps_gen_parport.c | |||
@@ -198,7 +198,7 @@ static void parport_attach(struct parport *port) | |||
198 | } | 198 | } |
199 | 199 | ||
200 | device.pardev = parport_register_device(port, KBUILD_MODNAME, | 200 | device.pardev = parport_register_device(port, KBUILD_MODNAME, |
201 | NULL, NULL, NULL, 0, &device); | 201 | NULL, NULL, NULL, PARPORT_FLAG_EXCL, &device); |
202 | if (!device.pardev) { | 202 | if (!device.pardev) { |
203 | pr_err("couldn't register with %s\n", port->name); | 203 | pr_err("couldn't register with %s\n", port->name); |
204 | return; | 204 | return; |