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 <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e7d8712c15
commit
4727810705
|
@ -269,7 +269,7 @@ static int idmouse_release(struct inode *inode, struct file *file)
|
||||||
/* prevent a race condition with open() */
|
/* prevent a race condition with open() */
|
||||||
mutex_lock(&disconnect_mutex);
|
mutex_lock(&disconnect_mutex);
|
||||||
|
|
||||||
dev = (struct usb_idmouse *) file->private_data;
|
dev = file->private_data;
|
||||||
|
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
mutex_unlock(&disconnect_mutex);
|
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,
|
static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count,
|
||||||
loff_t * ppos)
|
loff_t * ppos)
|
||||||
{
|
{
|
||||||
struct usb_idmouse *dev;
|
struct usb_idmouse *dev = file->private_data;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
dev = (struct usb_idmouse *) file->private_data;
|
|
||||||
|
|
||||||
/* lock this object */
|
/* lock this object */
|
||||||
down (&dev->sem);
|
down(&dev->sem);
|
||||||
|
|
||||||
/* verify that the device wasn't unplugged */
|
/* verify that the device wasn't unplugged */
|
||||||
if (!dev->present) {
|
if (!dev->present) {
|
||||||
up (&dev->sem);
|
up(&dev->sem);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue