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

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

authored by

Jarod Wilson and committed by
Mauro Carvalho Chehab
a36e83c9 c1cbb702

+1 -27
+1 -1
drivers/staging/lirc/Kconfig
··· 53 53 54 54 config LIRC_PARALLEL 55 55 tristate "Homebrew Parallel Port Receiver" 56 - depends on LIRC_STAGING && PARPORT && !SMP 56 + depends on LIRC_STAGING && PARPORT 57 57 help 58 58 Driver for Homebrew Parallel Port Receivers 59 59
-26
drivers/staging/lirc/lirc_parallel.c
··· 24 24 25 25 /*** Includes ***/ 26 26 27 - #ifdef CONFIG_SMP 28 - #error "--- Sorry, this driver is not SMP safe. ---" 29 - #endif 30 - 31 27 #include <linux/module.h> 32 28 #include <linux/sched.h> 33 29 #include <linux/errno.h> ··· 574 578 575 579 static int pf(void *handle); 576 580 static void kf(void *handle); 577 - 578 - static struct timer_list poll_timer; 579 - static void poll_state(unsigned long ignored); 580 - 581 - static void poll_state(unsigned long ignored) 582 - { 583 - printk(KERN_NOTICE "%s: time\n", 584 - LIRC_DRIVER_NAME); 585 - del_timer(&poll_timer); 586 - if (is_claimed) 587 - return; 588 - kf(NULL); 589 - if (!is_claimed) { 590 - printk(KERN_NOTICE "%s: could not claim port, giving up\n", 591 - LIRC_DRIVER_NAME); 592 - init_timer(&poll_timer); 593 - poll_timer.expires = jiffies + HZ; 594 - poll_timer.data = (unsigned long)current; 595 - poll_timer.function = poll_state; 596 - add_timer(&poll_timer); 597 - } 598 - } 599 581 600 582 static int pf(void *handle) 601 583 {