History

[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).

Jarod Wilson committed 16 years ago

Commit a36e83c1 parent c1cbb702 files · +1 −27Browse files

Showing the changes to drivers/staging/lirc (2 of 2 files). Show all

Unified · Split

2 files
  1. drivers/staging/lirc/Kconfig +1 −1
  2. drivers/staging/lirc/lirc_parallel.c +0 −26
drivers/staging/lirc/Kconfig+1−1
@@ -53,7 +53,7 @@ config LIRC_ITE8709 · 52 unmodified lines
53 53
54config LIRC_PARALLEL54config LIRC_PARALLEL
55 tristate "Homebrew Parallel Port Receiver"55 tristate "Homebrew Parallel Port Receiver"
56 depends on LIRC_STAGING && PARPORT && !SMP56 depends on LIRC_STAGING && PARPORT
57 help57 help
58 Driver for Homebrew Parallel Port Receivers58 Driver for Homebrew Parallel Port Receivers
59 59
drivers/staging/lirc/lirc_parallel.c+0−26
@@ -24,10 +24,6 @@ · 23 unmodified lines
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 = { · 545 unmodified lines
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);