Commit 771378bb authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-usb: octeon-hcd: use tabs for code indent

Replace spaces with tabs where possible.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a588577
......@@ -146,10 +146,10 @@ static void octeon_usb_urb_complete_callback(cvmx_usb_state_t *usb,
if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
int i;
/* The pointer to the private list is stored in the setup_packet field */
cvmx_usb_iso_packet_t *iso_packet = (cvmx_usb_iso_packet_t *)urb->setup_packet;
cvmx_usb_iso_packet_t *iso_packet = (cvmx_usb_iso_packet_t *) urb->setup_packet;
/* Recalculate the transfer size by adding up each packet */
urb->actual_length = 0;
for (i=0; i<urb->number_of_packets; i++) {
for (i = 0; i < urb->number_of_packets; i++) {
if (iso_packet[i].status == CVMX_USB_COMPLETE_SUCCESS) {
urb->iso_frame_desc[i].status = 0;
urb->iso_frame_desc[i].actual_length = iso_packet[i].length;
......@@ -275,7 +275,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
transfer_type,
usb_pipein(urb->pipe) ? CVMX_USB_DIRECTION_IN : CVMX_USB_DIRECTION_OUT,
urb->interval,
(le16_to_cpu(ep->desc.wMaxPacketSize)>>11) & 0x3,
(le16_to_cpu(ep->desc.wMaxPacketSize) >> 11) & 0x3,
split_device,
split_port);
if (pipe_handle < 0) {
......@@ -283,7 +283,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
DEBUG_ERROR("OcteonUSB: %s failed to create pipe\n", __FUNCTION__);
return -ENOMEM;
}
ep->hcpriv = (void*)(0x10000L + pipe_handle);
ep->hcpriv = (void *)(0x10000L + pipe_handle);
}
else
pipe_handle = 0xffff & (long)ep->hcpriv;
......@@ -297,7 +297,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
if (iso_packet) {
int i;
/* Fill the list with the data from the URB */
for (i=0; i<urb->number_of_packets; i++) {
for (i = 0; i < urb->number_of_packets; i++) {
iso_packet[i].offset = urb->iso_frame_desc[i].offset;
iso_packet[i].length = urb->iso_frame_desc[i].length;
iso_packet[i].status = CVMX_USB_COMPLETE_ERROR;
......@@ -305,10 +305,10 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
/* Store a pointer to the list in uthe URB setup_pakcet field.
We know this currently isn't being used and this saves us
a bunch of logic */
urb->setup_packet = (char*)iso_packet;
urb->setup_packet = (char *)iso_packet;
submit_handle = cvmx_usb_submit_isochronous(&priv->usb, pipe_handle,
urb->start_frame,
0 /* flags */,
0 /* flags */ ,
urb->number_of_packets,
iso_packet,
urb->transfer_dma,
......@@ -353,7 +353,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
DEBUG_ERROR("OcteonUSB: %s failed to submit\n", __FUNCTION__);
return -ENOMEM;
}
urb->hcpriv = (void*)(long)(((submit_handle & 0xffff) << 16) | pipe_handle);
urb->hcpriv = (void *)(long)(((submit_handle & 0xffff) << 16) | pipe_handle);
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
}
......@@ -432,7 +432,7 @@ static int octeon_usb_hub_status_data(struct usb_hcd *hcd, char *buf)
buf[0] = 0;
buf[0] = port_status.connect_change << 1;
return(buf[0] != 0);
return (buf[0] != 0);
}
static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength)
......@@ -535,7 +535,7 @@ static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
break;
case GetHubStatus:
DEBUG_ROOT_HUB("OcteonUSB: GetHubStatus\n");
*(__le32 *)buf = 0;
*(__le32 *) buf = 0;
break;
case GetPortStatus:
DEBUG_ROOT_HUB("OcteonUSB: GetPortStatus");
......@@ -587,7 +587,7 @@ static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
DEBUG_ROOT_HUB(" LOWSPEED");
}
*((__le32 *)buf) = cpu_to_le32(port_status);
*((__le32 *) buf) = cpu_to_le32(port_status);
DEBUG_ROOT_HUB("\n");
break;
case SetHubFeature:
......@@ -778,10 +778,10 @@ static int __init octeon_usb_module_init(void)
struct resource irq_resource;
struct platform_device *pdev;
memset(&irq_resource, 0, sizeof(irq_resource));
irq_resource.start = (device==0) ? OCTEON_IRQ_USB0 : OCTEON_IRQ_USB1;
irq_resource.start = (device == 0) ? OCTEON_IRQ_USB0 : OCTEON_IRQ_USB1;
irq_resource.end = irq_resource.start;
irq_resource.flags = IORESOURCE_IRQ;
pdev = platform_device_register_simple((char*)octeon_usb_driver.name, device, &irq_resource, 1);
pdev = platform_device_register_simple((char *)octeon_usb_driver. name, device, &irq_resource, 1);
if (IS_ERR(pdev)) {
DEBUG_FATAL("OcteonUSB: Failed to allocate platform device for USB%d\n", device);
driver_unregister(&octeon_usb_driver);
......@@ -799,7 +799,7 @@ static void __exit octeon_usb_module_cleanup(void)
{
int i;
DEBUG_CALL("OcteonUSB: %s called\n", __FUNCTION__);
for (i = 0; i <MAX_USB_PORTS; i++)
for (i = 0; i < MAX_USB_PORTS; i++)
if (pdev_glob[i]) {
platform_device_unregister(pdev_glob[i]);
pdev_glob[i] = NULL;
......
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