diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-07-23 15:19:00 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-07-23 15:19:00 +0200 |
commit | 9063974cdbc5463528cb6aa60c91bc0267af7bbb (patch) | |
tree | 1dffc62d8b79b3d89459cf23aa59c553e186840a /drivers/hid | |
parent | d6d6a86e14a6b5a26c785b45268874a8f7a52b4d (diff) | |
parent | c010b2f76c3032e48097a6eef291d8593d5d79a6 (diff) | |
download | op-kernel-dev-9063974cdbc5463528cb6aa60c91bc0267af7bbb.zip op-kernel-dev-9063974cdbc5463528cb6aa60c91bc0267af7bbb.tar.gz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hidraw.c | 8 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 1ca6f46..0c6b4d4 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -30,6 +30,7 @@ #include <linux/major.h> #include <linux/hid.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #include <linux/hidraw.h> @@ -157,6 +158,7 @@ static int hidraw_open(struct inode *inode, struct file *file) struct hidraw_list *list; int err = 0; + lock_kernel(); if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) { err = -ENOMEM; goto out; @@ -183,6 +185,7 @@ static int hidraw_open(struct inode *inode, struct file *file) out_unlock: spin_unlock(&minors_lock); out: + unlock_kernel(); return err; } @@ -319,8 +322,9 @@ int hidraw_connect(struct hid_device *hid) goto out; } - dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor), - "%s%d", "hidraw", minor); + dev->dev = device_create_drvdata(hidraw_class, NULL, + MKDEV(hidraw_major, minor), NULL, + "%s%d", "hidraw", minor); if (IS_ERR(dev->dev)) { spin_lock(&minors_lock); diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 01427c5..27fe4d8 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work) dev_dbg(&usbhid->intf->dev, "resetting device\n"); rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf); if (rc_lock >= 0) { - rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf); + rc = usb_reset_device(hid_to_usb_dev(hid)); if (rc_lock) usb_unlock_device(hid_to_usb_dev(hid)); } |