aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-10-19 11:54:05 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 18:05:36 -0400
commita36e83c94ca9bfae8dae8a7ab98f18931f70612d (patch)
tree69ba49781f80836060752139144c355e7d0aceaf
parentc1cbb7029e81894c056680d61c64741bd2ff246f (diff)
[media] lirc_parallel: build on smp and kill dead code
Talked to Christoph Bartelmus about this a bit, and he says this driver actually *should* work okay on CONFIG_SMP, the check was a legacy one from the very early days of SMP support before it had stabilized (yes, this driver is that ancient). Also remove some completely unused code, only noticed after building this driver for the first time in an eternity (on an SMP host now, of course). Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/lirc/Kconfig2
-rw-r--r--drivers/staging/lirc/lirc_parallel.c26
2 files changed, 1 insertions, 27 deletions
diff --git a/drivers/staging/lirc/Kconfig b/drivers/staging/lirc/Kconfig
index 100c4d4b8125..fa790db75d7e 100644
--- a/drivers/staging/lirc/Kconfig
+++ b/drivers/staging/lirc/Kconfig
@@ -53,7 +53,7 @@ config LIRC_ITE8709
53 53
54config LIRC_PARALLEL 54config LIRC_PARALLEL
55 tristate "Homebrew Parallel Port Receiver" 55 tristate "Homebrew Parallel Port Receiver"
56 depends on LIRC_STAGING && PARPORT && !SMP 56 depends on LIRC_STAGING && PARPORT
57 help 57 help
58 Driver for Homebrew Parallel Port Receivers 58 Driver for Homebrew Parallel Port Receivers
59 59
diff --git a/drivers/staging/lirc/lirc_parallel.c b/drivers/staging/lirc/lirc_parallel.c
index b8cce87c7032..884904c782d1 100644
--- a/drivers/staging/lirc/lirc_parallel.c
+++ b/drivers/staging/lirc/lirc_parallel.c
@@ -24,10 +24,6 @@
24 24
25/*** Includes ***/ 25/*** Includes ***/
26 26
27#ifdef CONFIG_SMP
28#error "--- Sorry, this driver is not SMP safe. ---"
29#endif
30
31#include <linux/module.h> 27#include <linux/module.h>
32#include <linux/sched.h> 28#include <linux/sched.h>
33#include <linux/errno.h> 29#include <linux/errno.h>
@@ -579,28 +575,6 @@ static struct lirc_driver driver = {
579static int pf(void *handle); 575static int pf(void *handle);
580static void kf(void *handle); 576static void kf(void *handle);
581 577
582static struct timer_list poll_timer;
583static void poll_state(unsigned long ignored);
584
585static void poll_state(unsigned long ignored)
586{
587 printk(KERN_NOTICE "%s: time\n",
588 LIRC_DRIVER_NAME);
589 del_timer(&poll_timer);
590 if (is_claimed)
591 return;
592 kf(NULL);
593 if (!is_claimed) {
594 printk(KERN_NOTICE "%s: could not claim port, giving up\n",
595 LIRC_DRIVER_NAME);
596 init_timer(&poll_timer);
597 poll_timer.expires = jiffies + HZ;
598 poll_timer.data = (unsigned long)current;
599 poll_timer.function = poll_state;
600 add_timer(&poll_timer);
601 }
602}
603
604static int pf(void *handle) 578static int pf(void *handle)
605{ 579{
606 parport_disable_irq(pport); 580 parport_disable_irq(pport);