aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-09-13 15:38:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:59 -0400
commitec17cf1cfe0b557210b27313bd584e9b5187d4ca (patch)
tree002f63361c189d3ce3820284199e6fe5d3d95eec /drivers/usb/core/devio.c
parentd774efeabccf5f5207aa70d5c126fc928e8b30bd (diff)
USB: Remove unneeded void * casts in core files
The patch removes unneeded casts for the following (void *) pointers: - struct file: private - struct urb: context - struct usb_bus: hcpriv - return value of kmalloc() The patch also contains some whitespace cleanup in the relevant areas. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 71bbd25a4ed0..a94c63bef632 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -122,7 +122,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
122 122
123static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) 123static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
124{ 124{
125 struct dev_state *ps = (struct dev_state *)file->private_data; 125 struct dev_state *ps = file->private_data;
126 struct usb_device *dev = ps->dev; 126 struct usb_device *dev = ps->dev;
127 ssize_t ret = 0; 127 ssize_t ret = 0;
128 unsigned len; 128 unsigned len;
@@ -305,7 +305,7 @@ static void snoop_urb(struct urb *urb, void __user *userurb)
305 305
306static void async_completed(struct urb *urb, struct pt_regs *regs) 306static void async_completed(struct urb *urb, struct pt_regs *regs)
307{ 307{
308 struct async *as = (struct async *)urb->context; 308 struct async *as = urb->context;
309 struct dev_state *ps = as->ps; 309 struct dev_state *ps = as->ps;
310 struct siginfo sinfo; 310 struct siginfo sinfo;
311 311
@@ -591,7 +591,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
591 591
592static int usbdev_release(struct inode *inode, struct file *file) 592static int usbdev_release(struct inode *inode, struct file *file)
593{ 593{
594 struct dev_state *ps = (struct dev_state *)file->private_data; 594 struct dev_state *ps = file->private_data;
595 struct usb_device *dev = ps->dev; 595 struct usb_device *dev = ps->dev;
596 unsigned int ifnum; 596 unsigned int ifnum;
597 597
@@ -1423,7 +1423,7 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg)
1423 */ 1423 */
1424static int usbdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) 1424static int usbdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
1425{ 1425{
1426 struct dev_state *ps = (struct dev_state *)file->private_data; 1426 struct dev_state *ps = file->private_data;
1427 struct usb_device *dev = ps->dev; 1427 struct usb_device *dev = ps->dev;
1428 void __user *p = (void __user *)arg; 1428 void __user *p = (void __user *)arg;
1429 int ret = -ENOTTY; 1429 int ret = -ENOTTY;
@@ -1566,8 +1566,8 @@ static int usbdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
1566/* No kernel lock - fine */ 1566/* No kernel lock - fine */
1567static unsigned int usbdev_poll(struct file *file, struct poll_table_struct *wait) 1567static unsigned int usbdev_poll(struct file *file, struct poll_table_struct *wait)
1568{ 1568{
1569 struct dev_state *ps = (struct dev_state *)file->private_data; 1569 struct dev_state *ps = file->private_data;
1570 unsigned int mask = 0; 1570 unsigned int mask = 0;
1571 1571
1572 poll_wait(file, &ps->wait, wait); 1572 poll_wait(file, &ps->wait, wait);
1573 if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed)) 1573 if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed))