Commit 373b2edd authored by Stefan Richter's avatar Stefan Richter

firewire: adjust whitespace

Remove space before tab and trailing whitespace.
Unify indentation of goto target labels.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 98b6cbe8
...@@ -145,7 +145,7 @@ fw_unit_uevent(struct device *dev, char **envp, int num_envp, ...@@ -145,7 +145,7 @@ fw_unit_uevent(struct device *dev, char **envp, int num_envp,
"MODALIAS=%s", modalias)) "MODALIAS=%s", modalias))
return -ENOMEM; return -ENOMEM;
out: out:
envp[i] = NULL; envp[i] = NULL;
return 0; return 0;
...@@ -511,9 +511,9 @@ static void fw_device_init(struct work_struct *work) ...@@ -511,9 +511,9 @@ static void fw_device_init(struct work_struct *work)
return; return;
error_with_device: error_with_device:
device_del(&device->device); device_del(&device->device);
error: error:
cdev_del(&device->cdev); cdev_del(&device->cdev);
unregister_chrdev_region(device->device.devt, 1); unregister_chrdev_region(device->device.devt, 1);
put_device(&device->device); put_device(&device->device);
......
...@@ -47,7 +47,7 @@ fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, ...@@ -47,7 +47,7 @@ fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
if (buffer->pages[i] == NULL) if (buffer->pages[i] == NULL)
goto out_pages; goto out_pages;
address = dma_map_page(card->device, buffer->pages[i], address = dma_map_page(card->device, buffer->pages[i],
0, PAGE_SIZE, direction); 0, PAGE_SIZE, direction);
if (dma_mapping_error(address)) { if (dma_mapping_error(address)) {
......
...@@ -96,9 +96,9 @@ typedef int (*descriptor_callback_t)(struct context *ctx, ...@@ -96,9 +96,9 @@ typedef int (*descriptor_callback_t)(struct context *ctx,
struct descriptor *d, struct descriptor *d,
struct descriptor *last); struct descriptor *last);
struct context { struct context {
struct fw_ohci *ohci; struct fw_ohci *ohci;
u32 regs; u32 regs;
struct descriptor *buffer; struct descriptor *buffer;
dma_addr_t buffer_bus; dma_addr_t buffer_bus;
size_t buffer_size; size_t buffer_size;
...@@ -109,10 +109,8 @@ struct context { ...@@ -109,10 +109,8 @@ struct context {
descriptor_callback_t callback; descriptor_callback_t callback;
struct tasklet_struct tasklet; struct tasklet_struct tasklet;
}; };
struct at_context { struct at_context {
struct fw_ohci *ohci; struct fw_ohci *ohci;
...@@ -434,7 +432,7 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs) ...@@ -434,7 +432,7 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs)
return 0; return 0;
} }
static void context_tasklet(unsigned long data) static void context_tasklet(unsigned long data)
{ {
struct context *ctx = (struct context *) data; struct context *ctx = (struct context *) data;
...@@ -1269,7 +1267,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation) ...@@ -1269,7 +1267,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
spin_unlock_irqrestore(&ohci->lock, flags); spin_unlock_irqrestore(&ohci->lock, flags);
return retval; return retval;
} }
static int handle_ir_bufferfill_packet(struct context *context, static int handle_ir_bufferfill_packet(struct context *context,
struct descriptor *d, struct descriptor *d,
struct descriptor *last) struct descriptor *last)
...@@ -1324,7 +1322,7 @@ static int handle_it_packet(struct context *context, ...@@ -1324,7 +1322,7 @@ static int handle_it_packet(struct context *context,
{ {
struct iso_context *ctx = struct iso_context *ctx =
container_of(context, struct iso_context, context); container_of(context, struct iso_context, context);
if (last->transfer_status == 0) if (last->transfer_status == 0)
/* This descriptor isn't done yet, stop iteration. */ /* This descriptor isn't done yet, stop iteration. */
return 0; return 0;
...@@ -1352,8 +1350,8 @@ ohci_allocate_iso_context(struct fw_card *card, int type, ...@@ -1352,8 +1350,8 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
list = ohci->it_context_list; list = ohci->it_context_list;
callback = handle_it_packet; callback = handle_it_packet;
} else { } else {
mask = &ohci->ir_context_mask; mask = &ohci->ir_context_mask;
list = ohci->ir_context_list; list = ohci->ir_context_list;
if (header_size > 0) if (header_size > 0)
callback = handle_ir_dualbuffer_packet; callback = handle_ir_dualbuffer_packet;
else else
...@@ -1373,11 +1371,11 @@ ohci_allocate_iso_context(struct fw_card *card, int type, ...@@ -1373,11 +1371,11 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
if (index < 0) if (index < 0)
return ERR_PTR(-EBUSY); return ERR_PTR(-EBUSY);
if (type == FW_ISO_CONTEXT_TRANSMIT) if (type == FW_ISO_CONTEXT_TRANSMIT)
regs = OHCI1394_IsoXmitContextBase(index); regs = OHCI1394_IsoXmitContextBase(index);
else else
regs = OHCI1394_IsoRcvContextBase(index); regs = OHCI1394_IsoRcvContextBase(index);
ctx = &list[index]; ctx = &list[index];
memset(ctx, 0, sizeof *ctx); memset(ctx, 0, sizeof *ctx);
ctx->header_length = 0; ctx->header_length = 0;
...@@ -1404,7 +1402,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type, ...@@ -1404,7 +1402,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
static int ohci_start_iso(struct fw_iso_context *base, s32 cycle) static int ohci_start_iso(struct fw_iso_context *base, s32 cycle)
{ {
struct iso_context *ctx = container_of(base, struct iso_context, base); struct iso_context *ctx = container_of(base, struct iso_context, base);
struct fw_ohci *ohci = ctx->context.ohci; struct fw_ohci *ohci = ctx->context.ohci;
u32 cycle_match = 0, mode; u32 cycle_match = 0, mode;
int index; int index;
...@@ -1439,7 +1437,7 @@ static int ohci_start_iso(struct fw_iso_context *base, s32 cycle) ...@@ -1439,7 +1437,7 @@ static int ohci_start_iso(struct fw_iso_context *base, s32 cycle)
static int ohci_stop_iso(struct fw_iso_context *base) static int ohci_stop_iso(struct fw_iso_context *base)
{ {
struct fw_ohci *ohci = fw_ohci(base->card); struct fw_ohci *ohci = fw_ohci(base->card);
struct iso_context *ctx = container_of(base, struct iso_context, base); struct iso_context *ctx = container_of(base, struct iso_context, base);
int index; int index;
if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) { if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) {
...@@ -1458,7 +1456,7 @@ static int ohci_stop_iso(struct fw_iso_context *base) ...@@ -1458,7 +1456,7 @@ static int ohci_stop_iso(struct fw_iso_context *base)
static void ohci_free_iso_context(struct fw_iso_context *base) static void ohci_free_iso_context(struct fw_iso_context *base)
{ {
struct fw_ohci *ohci = fw_ohci(base->card); struct fw_ohci *ohci = fw_ohci(base->card);
struct iso_context *ctx = container_of(base, struct iso_context, base); struct iso_context *ctx = container_of(base, struct iso_context, base);
unsigned long flags; unsigned long flags;
int index; int index;
...@@ -1485,7 +1483,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base, ...@@ -1485,7 +1483,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base,
struct fw_iso_buffer *buffer, struct fw_iso_buffer *buffer,
unsigned long payload) unsigned long payload)
{ {
struct iso_context *ctx = container_of(base, struct iso_context, base); struct iso_context *ctx = container_of(base, struct iso_context, base);
struct descriptor *d, *last, *pd; struct descriptor *d, *last, *pd;
struct fw_iso_packet *p; struct fw_iso_packet *p;
__le32 *header; __le32 *header;
...@@ -1575,7 +1573,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base, ...@@ -1575,7 +1573,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base,
return 0; return 0;
} }
static int static int
setup_wait_descriptor(struct context *ctx) setup_wait_descriptor(struct context *ctx)
{ {
...@@ -1609,7 +1607,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base, ...@@ -1609,7 +1607,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
dma_addr_t d_bus, page_bus; dma_addr_t d_bus, page_bus;
u32 z, header_z, length, rest; u32 z, header_z, length, rest;
int page, offset; int page, offset;
/* FIXME: Cycle lost behavior should be configurable: lose /* FIXME: Cycle lost behavior should be configurable: lose
* packet, retransmit or terminate.. */ * packet, retransmit or terminate.. */
...@@ -1641,7 +1639,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base, ...@@ -1641,7 +1639,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
db->first_req_count = cpu_to_le16(p->header_length); db->first_req_count = cpu_to_le16(p->header_length);
db->first_res_count = db->first_req_count; db->first_res_count = db->first_req_count;
db->first_buffer = cpu_to_le32(d_bus + sizeof *db); db->first_buffer = cpu_to_le32(d_bus + sizeof *db);
if (offset + rest < PAGE_SIZE) if (offset + rest < PAGE_SIZE)
length = rest; length = rest;
else else
...@@ -1675,7 +1673,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, ...@@ -1675,7 +1673,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
dma_addr_t d_bus, page_bus; dma_addr_t d_bus, page_bus;
u32 length, rest; u32 length, rest;
int page, offset; int page, offset;
page = payload >> PAGE_SHIFT; page = payload >> PAGE_SHIFT;
offset = payload & ~PAGE_MASK; offset = payload & ~PAGE_MASK;
rest = packet->payload_length; rest = packet->payload_length;
...@@ -1691,7 +1689,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, ...@@ -1691,7 +1689,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
d->control = cpu_to_le16(descriptor_input_more | d->control = cpu_to_le16(descriptor_input_more |
descriptor_status | descriptor_status |
descriptor_branch_always); descriptor_branch_always);
if (offset + rest < PAGE_SIZE) if (offset + rest < PAGE_SIZE)
length = rest; length = rest;
else else
......
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