From: Tobias Klauser Date: Wed, 20 Dec 2006 10:42:12 +0000 (+0100) Subject: USB: Remove unneeded void * casts in idmouse.c X-Git-Tag: v2.6.21-rc2~42^2~9^2~58 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4727810705d3cf8d565a2cd6c1045bc1db7d3532;p=linux-2.6-omap-h63xx.git USB: Remove unneeded void * casts in idmouse.c The patch removes unneeded void * casts for the following (void *) pointers: - struct file: private_data The patch also contains some whitespace and coding style cleanups in the relevant areas. Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index c9418535bef..15c70bd048c 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) /* prevent a race condition with open() */ mutex_lock(&disconnect_mutex); - dev = (struct usb_idmouse *) file->private_data; + dev = file->private_data; if (dev == NULL) { mutex_unlock(&disconnect_mutex); @@ -304,17 +304,15 @@ static int idmouse_release(struct inode *inode, struct file *file) static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { - struct usb_idmouse *dev; + struct usb_idmouse *dev = file->private_data; int result; - dev = (struct usb_idmouse *) file->private_data; - /* lock this object */ - down (&dev->sem); + down(&dev->sem); /* verify that the device wasn't unplugged */ if (!dev->present) { - up (&dev->sem); + up(&dev->sem); return -ENODEV; }