diff options
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/hp_sdc_mlc.c | 5 | ||||
-rw-r--r-- | drivers/input/serio/q40kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/serio_raw.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/serport.c | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c index 6c84f4542cc..b587e2d576a 100644 --- a/drivers/input/serio/hp_sdc_mlc.c +++ b/drivers/input/serio/hp_sdc_mlc.c @@ -306,6 +306,11 @@ static int __init hp_sdc_mlc_init(void) { hil_mlc *mlc = &hp_sdc_mlc; +#ifdef __mc68000__ + if (!MACH_IS_HP300) + return -ENODEV; +#endif + printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n"); hp_sdc_mlc_priv.emtestmode = 0; diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index ab28cf5949f..e36a0901646 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -154,7 +154,7 @@ static int __init q40kbd_init(void) int error; if (!MACH_IS_Q40) - return -EIO; + return -ENODEV; error = platform_driver_register(&q40kbd_driver); if (error) diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 0403622ae26..c9397c8ee97 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -10,6 +10,7 @@ */ #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/poll.h> #include <linux/module.h> #include <linux/serio.h> @@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file) struct serio_raw_list *list; int retval = 0; + lock_kernel(); retval = mutex_lock_interruptible(&serio_raw_mutex); if (retval) - return retval; + goto out_bkl; if (!(serio_raw = serio_raw_locate(iminor(inode)))) { retval = -ENODEV; @@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) out: mutex_unlock(&serio_raw_mutex); +out_bkl: + unlock_kernel(); return retval; } diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c index 7ff71ba7b7c..b9694b6445d 100644 --- a/drivers/input/serio/serport.c +++ b/drivers/input/serio/serport.c @@ -216,7 +216,7 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty) * The line discipline structure. */ -static struct tty_ldisc serport_ldisc = { +static struct tty_ldisc_ops serport_ldisc = { .owner = THIS_MODULE, .name = "input", .open = serport_ldisc_open, |