diff options
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 7 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index ab76ea442fa5..49d8abfe38fe 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/hp_sdc.h> | 36 | #include <linux/hp_sdc.h> |
37 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
38 | #include <linux/smp_lock.h> | ||
38 | #include <linux/types.h> | 39 | #include <linux/types.h> |
39 | #include <linux/init.h> | 40 | #include <linux/init.h> |
40 | #include <linux/module.h> | 41 | #include <linux/module.h> |
@@ -408,6 +409,7 @@ static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait) | |||
408 | 409 | ||
409 | static int hp_sdc_rtc_open(struct inode *inode, struct file *file) | 410 | static int hp_sdc_rtc_open(struct inode *inode, struct file *file) |
410 | { | 411 | { |
412 | cycle_kernel_lock(); | ||
411 | return 0; | 413 | return 0; |
412 | } | 414 | } |
413 | 415 | ||
@@ -691,6 +693,11 @@ static int __init hp_sdc_rtc_init(void) | |||
691 | { | 693 | { |
692 | int ret; | 694 | int ret; |
693 | 695 | ||
696 | #ifdef __mc68000__ | ||
697 | if (!MACH_IS_HP300) | ||
698 | return -ENODEV; | ||
699 | #endif | ||
700 | |||
694 | init_MUTEX(&i8042tregs); | 701 | init_MUTEX(&i8042tregs); |
695 | 702 | ||
696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) | 703 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index a56ad4ba8fe2..2bcfa0b35061 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
38 | #include <linux/miscdevice.h> | 38 | #include <linux/miscdevice.h> |
39 | #include <linux/uinput.h> | 39 | #include <linux/uinput.h> |
40 | #include <linux/smp_lock.h> | ||
40 | 41 | ||
41 | static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) | 42 | static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) |
42 | { | 43 | { |
@@ -222,6 +223,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
222 | if (!newdev) | 223 | if (!newdev) |
223 | return -ENOMEM; | 224 | return -ENOMEM; |
224 | 225 | ||
226 | lock_kernel(); | ||
225 | mutex_init(&newdev->mutex); | 227 | mutex_init(&newdev->mutex); |
226 | spin_lock_init(&newdev->requests_lock); | 228 | spin_lock_init(&newdev->requests_lock); |
227 | init_waitqueue_head(&newdev->requests_waitq); | 229 | init_waitqueue_head(&newdev->requests_waitq); |
@@ -229,6 +231,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
229 | newdev->state = UIST_NEW_DEVICE; | 231 | newdev->state = UIST_NEW_DEVICE; |
230 | 232 | ||
231 | file->private_data = newdev; | 233 | file->private_data = newdev; |
234 | unlock_kernel(); | ||
232 | 235 | ||
233 | return 0; | 236 | return 0; |
234 | } | 237 | } |