diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
commit | c96e2c92072d3e78954c961f53d8c7352f7abbd7 (patch) | |
tree | d844f26f926ff40e98e9eae0e11fd71acad81df4 /drivers/usb/misc/idmouse.c | |
parent | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (diff) | |
parent | 64358164f5bfe5e11d4040c1eb674c29e1436ce5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (70 commits)
USB: remove duplicate device id from zc0301
USB: remove duplicate device id from usb_storage
USB: remove duplicate device id from keyspan
USB: remove duplicate device id from ftdi_sio
USB: remove duplicate device id from visor
USB: a bit more coding style cleanup
usbcore: trivial whitespace fixes
usb-storage: use first bulk endpoints, not last
EHCI: fix interrupt-driven remote wakeup
USB: switch ehci-hcd to new polling scheme
USB: autosuspend for usb printer driver
USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
USB: Sierra Wireless auto set D0
USB: usb ethernet gadget recognizes HUSB2DEV
USB: list atmel husb2_udc gadget controller
USB: gadgetfs AIO tweaks
USB: gadgetfs behaves better on userspace init bug
USB: gadgetfs race fix
USB: gadgetfs simplifications
USB: gadgetfs cleanups
...
Diffstat (limited to 'drivers/usb/misc/idmouse.c')
-rw-r--r-- | drivers/usb/misc/idmouse.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index c9418535bef8..15c70bd048c4 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c | |||
@@ -269,7 +269,7 @@ static int idmouse_release(struct inode *inode, struct file *file) | |||
269 | /* prevent a race condition with open() */ | 269 | /* prevent a race condition with open() */ |
270 | mutex_lock(&disconnect_mutex); | 270 | mutex_lock(&disconnect_mutex); |
271 | 271 | ||
272 | dev = (struct usb_idmouse *) file->private_data; | 272 | dev = file->private_data; |
273 | 273 | ||
274 | if (dev == NULL) { | 274 | if (dev == NULL) { |
275 | mutex_unlock(&disconnect_mutex); | 275 | mutex_unlock(&disconnect_mutex); |
@@ -304,17 +304,15 @@ static int idmouse_release(struct inode *inode, struct file *file) | |||
304 | static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count, | 304 | static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count, |
305 | loff_t * ppos) | 305 | loff_t * ppos) |
306 | { | 306 | { |
307 | struct usb_idmouse *dev; | 307 | struct usb_idmouse *dev = file->private_data; |
308 | int result; | 308 | int result; |
309 | 309 | ||
310 | dev = (struct usb_idmouse *) file->private_data; | ||
311 | |||
312 | /* lock this object */ | 310 | /* lock this object */ |
313 | down (&dev->sem); | 311 | down(&dev->sem); |
314 | 312 | ||
315 | /* verify that the device wasn't unplugged */ | 313 | /* verify that the device wasn't unplugged */ |
316 | if (!dev->present) { | 314 | if (!dev->present) { |
317 | up (&dev->sem); | 315 | up(&dev->sem); |
318 | return -ENODEV; | 316 | return -ENODEV; |
319 | } | 317 | } |
320 | 318 | ||