Commit eb0ebaf6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fix up formatting problems in the legotower driver

Basically fixed up spaces to tabs problems.
parent 4a62274d
/* /*
* LEGO USB Tower driver * LEGO USB Tower driver
* *
* Copyright (c) 2003 David Glance <davidgsf@sourceforge.net> * Copyright (C) 2003 David Glance <davidgsf@sourceforge.net>
* 2001 Juergen Stuber <stuber@loria.fr> * 2001 Juergen Stuber <stuber@loria.fr>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* derived from USB Skeleton driver - 0.5 * derived from USB Skeleton driver - 0.5
* Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com) * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
* *
* History: * History:
* *
...@@ -127,10 +127,6 @@ struct lego_usb_tower { ...@@ -127,10 +127,6 @@ struct lego_usb_tower {
* interrupt_in_buffer belongs to urb alone and is overwritten on overflow * interrupt_in_buffer belongs to urb alone and is overwritten on overflow
*/ */
/* the global usb devfs handle */
// extern devfs_handle_t usb_devfs_handle;
/* local function prototypes */ /* local function prototypes */
static ssize_t tower_read (struct file *file, char *buffer, size_t count, loff_t *ppos); static ssize_t tower_read (struct file *file, char *buffer, size_t count, loff_t *ppos);
static ssize_t tower_write (struct file *file, const char *buffer, size_t count, loff_t *ppos); static ssize_t tower_write (struct file *file, const char *buffer, size_t count, loff_t *ppos);
...@@ -279,7 +275,7 @@ static int tower_open (struct inode *inode, struct file *file) ...@@ -279,7 +275,7 @@ static int tower_open (struct inode *inode, struct file *file)
up (&dev->sem); up (&dev->sem);
exit_no_device: exit_no_device:
up (&disconnect_sem); up (&disconnect_sem);
...@@ -319,7 +315,7 @@ static int tower_release (struct inode *inode, struct file *file) ...@@ -319,7 +315,7 @@ static int tower_release (struct inode *inode, struct file *file)
/* do the work */ /* do the work */
retval = tower_release_internal (dev); retval = tower_release_internal (dev);
exit: exit:
up (&dev->sem); up (&dev->sem);
dbg(2," %s : leave, return value %d", __func__, retval); dbg(2," %s : leave, return value %d", __func__, retval);
return retval; return retval;
...@@ -348,7 +344,7 @@ static int tower_release_internal (struct lego_usb_tower *dev) ...@@ -348,7 +344,7 @@ static int tower_release_internal (struct lego_usb_tower *dev)
dev->open_count = 0; dev->open_count = 0;
} }
exit: exit:
dbg(2," %s : leave", __func__); dbg(2," %s : leave", __func__);
return retval; return retval;
} }
...@@ -375,7 +371,7 @@ static void tower_abort_transfers (struct lego_usb_tower *dev) ...@@ -375,7 +371,7 @@ static void tower_abort_transfers (struct lego_usb_tower *dev)
usb_unlink_urb (dev->interrupt_out_urb); usb_unlink_urb (dev->interrupt_out_urb);
} }
exit: exit:
dbg(2," %s : leave", __func__); dbg(2," %s : leave", __func__);
} }
...@@ -468,13 +464,11 @@ static ssize_t tower_read (struct file *file, char *buffer, size_t count, loff_t ...@@ -468,13 +464,11 @@ static ssize_t tower_read (struct file *file, char *buffer, size_t count, loff_t
break; break;
} }
} }
} }
retval = bytes_read; retval = bytes_read;
exit: exit:
/* unlock the device */ /* unlock the device */
up (&dev->sem); up (&dev->sem);
...@@ -545,7 +539,6 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count, ...@@ -545,7 +539,6 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count,
} }
dbg(4," %s : in progress, count = %d", __func__, count); dbg(4," %s : in progress, count = %d", __func__, count);
} else { } else {
dbg(4," %s : sending, count = %d", __func__, count); dbg(4," %s : sending, count = %d", __func__, count);
...@@ -560,8 +553,7 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count, ...@@ -560,8 +553,7 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count,
} }
/* send off the urb */ /* send off the urb */
usb_fill_int_urb( usb_fill_int_urb(dev->interrupt_out_urb,
dev->interrupt_out_urb,
dev->udev, dev->udev,
usb_sndintpipe(dev->udev, dev->interrupt_out_endpoint->bEndpointAddress), usb_sndintpipe(dev->udev, dev->interrupt_out_endpoint->bEndpointAddress),
dev->interrupt_out_buffer, dev->interrupt_out_buffer,
...@@ -587,7 +579,7 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count, ...@@ -587,7 +579,7 @@ static ssize_t tower_write (struct file *file, const char *buffer, size_t count,
retval = bytes_written; retval = bytes_written;
exit: exit:
/* unlock the device */ /* unlock the device */
up (&dev->sem); up (&dev->sem);
...@@ -647,7 +639,7 @@ static void tower_interrupt_in_callback (struct urb *urb, struct pt_regs *regs) ...@@ -647,7 +639,7 @@ static void tower_interrupt_in_callback (struct urb *urb, struct pt_regs *regs)
up (&dev->sem); up (&dev->sem);
exit: exit:
lego_usb_tower_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer); lego_usb_tower_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer);
dbg(4," %s : leave, status %d", __func__, urb->status); dbg(4," %s : leave, status %d", __func__, urb->status);
} }
...@@ -672,7 +664,7 @@ static void tower_interrupt_out_callback (struct urb *urb, struct pt_regs *regs) ...@@ -672,7 +664,7 @@ static void tower_interrupt_out_callback (struct urb *urb, struct pt_regs *regs)
} }
wake_up_interruptible(&dev->write_wait); wake_up_interruptible(&dev->write_wait);
exit: exit:
lego_usb_tower_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer); lego_usb_tower_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer);
dbg(4," %s : leave, status %d", __func__, urb->status); dbg(4," %s : leave, status %d", __func__, urb->status);
...@@ -808,12 +800,12 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device ...@@ -808,12 +800,12 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
exit: exit:
dbg(2," %s : leave, return value 0x%.8lx (dev)", __func__, (long) dev); dbg(2," %s : leave, return value 0x%.8lx (dev)", __func__, (long) dev);
return retval; return retval;
error: error:
tower_delete(dev); tower_delete(dev);
return retval; return retval;
} }
...@@ -882,7 +874,7 @@ static int __init lego_usb_tower_init(void) ...@@ -882,7 +874,7 @@ static int __init lego_usb_tower_init(void)
info(DRIVER_DESC " " DRIVER_VERSION); info(DRIVER_DESC " " DRIVER_VERSION);
exit: exit:
dbg(2," %s : leave, return value %d", __func__, retval); dbg(2," %s : leave, return value %d", __func__, retval);
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment