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