aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-07-21 00:55:14 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-07-21 00:55:14 -0400
commit908cf4b925e419bc74f3297b2f0e51d6f8a81da2 (patch)
tree6c2da79366d4695a9c2560ab18259eca8a2a25b4 /drivers/input/misc
parent92c49890922d54cba4b1eadeb0b185773c2c9570 (diff)
parent14b395e35d1afdd8019d11b92e28041fad591b71 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c7
-rw-r--r--drivers/input/misc/uinput.c3
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
409static int hp_sdc_rtc_open(struct inode *inode, struct file *file) 410static 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
41static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) 42static 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}