diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-04 08:45:18 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 16:03:04 -0500 |
commit | 373b2edd864b8753419521b715bd1ddafd2f2af3 (patch) | |
tree | 5908784cbb43e49161c0fc16cecbd9043201d9c0 | |
parent | 98b6cbe83b6e8db54638746c9040c7962d96b322 (diff) |
firewire: adjust whitespace
Remove space before tab and trailing whitespace.
Unify indentation of goto target labels.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r-- | drivers/firewire/fw-device.c | 6 | ||||
-rw-r--r-- | drivers/firewire/fw-iso.c | 2 | ||||
-rw-r--r-- | drivers/firewire/fw-ohci.c | 46 |
3 files changed, 26 insertions, 28 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c index df2e9296ad5b..e8f2dc3151bd 100644 --- a/drivers/firewire/fw-device.c +++ b/drivers/firewire/fw-device.c | |||
@@ -145,7 +145,7 @@ fw_unit_uevent(struct device *dev, char **envp, int num_envp, | |||
145 | "MODALIAS=%s", modalias)) | 145 | "MODALIAS=%s", modalias)) |
146 | return -ENOMEM; | 146 | return -ENOMEM; |
147 | 147 | ||
148 | out: | 148 | out: |
149 | envp[i] = NULL; | 149 | envp[i] = NULL; |
150 | 150 | ||
151 | return 0; | 151 | return 0; |
@@ -511,9 +511,9 @@ static void fw_device_init(struct work_struct *work) | |||
511 | 511 | ||
512 | return; | 512 | return; |
513 | 513 | ||
514 | error_with_device: | 514 | error_with_device: |
515 | device_del(&device->device); | 515 | device_del(&device->device); |
516 | error: | 516 | error: |
517 | cdev_del(&device->cdev); | 517 | cdev_del(&device->cdev); |
518 | unregister_chrdev_region(device->device.devt, 1); | 518 | unregister_chrdev_region(device->device.devt, 1); |
519 | put_device(&device->device); | 519 | put_device(&device->device); |
diff --git a/drivers/firewire/fw-iso.c b/drivers/firewire/fw-iso.c index 728cbb3ee91d..3eaf88005c5d 100644 --- a/drivers/firewire/fw-iso.c +++ b/drivers/firewire/fw-iso.c | |||
@@ -47,7 +47,7 @@ fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, | |||
47 | buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); | 47 | buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO); |
48 | if (buffer->pages[i] == NULL) | 48 | if (buffer->pages[i] == NULL) |
49 | goto out_pages; | 49 | goto out_pages; |
50 | 50 | ||
51 | address = dma_map_page(card->device, buffer->pages[i], | 51 | address = dma_map_page(card->device, buffer->pages[i], |
52 | 0, PAGE_SIZE, direction); | 52 | 0, PAGE_SIZE, direction); |
53 | if (dma_mapping_error(address)) { | 53 | if (dma_mapping_error(address)) { |
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index ea43a5ed18cf..57eba7002b60 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -96,9 +96,9 @@ typedef int (*descriptor_callback_t)(struct context *ctx, | |||
96 | struct descriptor *d, | 96 | struct descriptor *d, |
97 | struct descriptor *last); | 97 | struct descriptor *last); |
98 | struct context { | 98 | struct context { |
99 | struct fw_ohci *ohci; | 99 | struct fw_ohci *ohci; |
100 | u32 regs; | 100 | u32 regs; |
101 | 101 | ||
102 | struct descriptor *buffer; | 102 | struct descriptor *buffer; |
103 | dma_addr_t buffer_bus; | 103 | dma_addr_t buffer_bus; |
104 | size_t buffer_size; | 104 | size_t buffer_size; |
@@ -109,10 +109,8 @@ struct context { | |||
109 | 109 | ||
110 | descriptor_callback_t callback; | 110 | descriptor_callback_t callback; |
111 | 111 | ||
112 | struct tasklet_struct tasklet; | 112 | struct tasklet_struct tasklet; |
113 | }; | 113 | }; |
114 | |||
115 | |||
116 | 114 | ||
117 | struct at_context { | 115 | struct at_context { |
118 | struct fw_ohci *ohci; | 116 | struct fw_ohci *ohci; |
@@ -434,7 +432,7 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs) | |||
434 | 432 | ||
435 | return 0; | 433 | return 0; |
436 | } | 434 | } |
437 | 435 | ||
438 | static void context_tasklet(unsigned long data) | 436 | static void context_tasklet(unsigned long data) |
439 | { | 437 | { |
440 | struct context *ctx = (struct context *) data; | 438 | struct context *ctx = (struct context *) data; |
@@ -1269,7 +1267,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation) | |||
1269 | spin_unlock_irqrestore(&ohci->lock, flags); | 1267 | spin_unlock_irqrestore(&ohci->lock, flags); |
1270 | return retval; | 1268 | return retval; |
1271 | } | 1269 | } |
1272 | 1270 | ||
1273 | static int handle_ir_bufferfill_packet(struct context *context, | 1271 | static int handle_ir_bufferfill_packet(struct context *context, |
1274 | struct descriptor *d, | 1272 | struct descriptor *d, |
1275 | struct descriptor *last) | 1273 | struct descriptor *last) |
@@ -1324,7 +1322,7 @@ static int handle_it_packet(struct context *context, | |||
1324 | { | 1322 | { |
1325 | struct iso_context *ctx = | 1323 | struct iso_context *ctx = |
1326 | container_of(context, struct iso_context, context); | 1324 | container_of(context, struct iso_context, context); |
1327 | 1325 | ||
1328 | if (last->transfer_status == 0) | 1326 | if (last->transfer_status == 0) |
1329 | /* This descriptor isn't done yet, stop iteration. */ | 1327 | /* This descriptor isn't done yet, stop iteration. */ |
1330 | return 0; | 1328 | return 0; |
@@ -1352,8 +1350,8 @@ ohci_allocate_iso_context(struct fw_card *card, int type, | |||
1352 | list = ohci->it_context_list; | 1350 | list = ohci->it_context_list; |
1353 | callback = handle_it_packet; | 1351 | callback = handle_it_packet; |
1354 | } else { | 1352 | } else { |
1355 | mask = &ohci->ir_context_mask; | 1353 | mask = &ohci->ir_context_mask; |
1356 | list = ohci->ir_context_list; | 1354 | list = ohci->ir_context_list; |
1357 | if (header_size > 0) | 1355 | if (header_size > 0) |
1358 | callback = handle_ir_dualbuffer_packet; | 1356 | callback = handle_ir_dualbuffer_packet; |
1359 | else | 1357 | else |
@@ -1373,11 +1371,11 @@ ohci_allocate_iso_context(struct fw_card *card, int type, | |||
1373 | if (index < 0) | 1371 | if (index < 0) |
1374 | return ERR_PTR(-EBUSY); | 1372 | return ERR_PTR(-EBUSY); |
1375 | 1373 | ||
1376 | if (type == FW_ISO_CONTEXT_TRANSMIT) | 1374 | if (type == FW_ISO_CONTEXT_TRANSMIT) |
1377 | regs = OHCI1394_IsoXmitContextBase(index); | 1375 | regs = OHCI1394_IsoXmitContextBase(index); |
1378 | else | 1376 | else |
1379 | regs = OHCI1394_IsoRcvContextBase(index); | 1377 | regs = OHCI1394_IsoRcvContextBase(index); |
1380 | 1378 | ||
1381 | ctx = &list[index]; | 1379 | ctx = &list[index]; |
1382 | memset(ctx, 0, sizeof *ctx); | 1380 | memset(ctx, 0, sizeof *ctx); |
1383 | ctx->header_length = 0; | 1381 | ctx->header_length = 0; |
@@ -1404,7 +1402,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type, | |||
1404 | 1402 | ||
1405 | static int ohci_start_iso(struct fw_iso_context *base, s32 cycle) | 1403 | static int ohci_start_iso(struct fw_iso_context *base, s32 cycle) |
1406 | { | 1404 | { |
1407 | struct iso_context *ctx = container_of(base, struct iso_context, base); | 1405 | struct iso_context *ctx = container_of(base, struct iso_context, base); |
1408 | struct fw_ohci *ohci = ctx->context.ohci; | 1406 | struct fw_ohci *ohci = ctx->context.ohci; |
1409 | u32 cycle_match = 0, mode; | 1407 | u32 cycle_match = 0, mode; |
1410 | int index; | 1408 | int index; |
@@ -1439,7 +1437,7 @@ static int ohci_start_iso(struct fw_iso_context *base, s32 cycle) | |||
1439 | static int ohci_stop_iso(struct fw_iso_context *base) | 1437 | static int ohci_stop_iso(struct fw_iso_context *base) |
1440 | { | 1438 | { |
1441 | struct fw_ohci *ohci = fw_ohci(base->card); | 1439 | struct fw_ohci *ohci = fw_ohci(base->card); |
1442 | struct iso_context *ctx = container_of(base, struct iso_context, base); | 1440 | struct iso_context *ctx = container_of(base, struct iso_context, base); |
1443 | int index; | 1441 | int index; |
1444 | 1442 | ||
1445 | if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) { | 1443 | if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) { |
@@ -1458,7 +1456,7 @@ static int ohci_stop_iso(struct fw_iso_context *base) | |||
1458 | static void ohci_free_iso_context(struct fw_iso_context *base) | 1456 | static void ohci_free_iso_context(struct fw_iso_context *base) |
1459 | { | 1457 | { |
1460 | struct fw_ohci *ohci = fw_ohci(base->card); | 1458 | struct fw_ohci *ohci = fw_ohci(base->card); |
1461 | struct iso_context *ctx = container_of(base, struct iso_context, base); | 1459 | struct iso_context *ctx = container_of(base, struct iso_context, base); |
1462 | unsigned long flags; | 1460 | unsigned long flags; |
1463 | int index; | 1461 | int index; |
1464 | 1462 | ||
@@ -1485,7 +1483,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base, | |||
1485 | struct fw_iso_buffer *buffer, | 1483 | struct fw_iso_buffer *buffer, |
1486 | unsigned long payload) | 1484 | unsigned long payload) |
1487 | { | 1485 | { |
1488 | struct iso_context *ctx = container_of(base, struct iso_context, base); | 1486 | struct iso_context *ctx = container_of(base, struct iso_context, base); |
1489 | struct descriptor *d, *last, *pd; | 1487 | struct descriptor *d, *last, *pd; |
1490 | struct fw_iso_packet *p; | 1488 | struct fw_iso_packet *p; |
1491 | __le32 *header; | 1489 | __le32 *header; |
@@ -1575,7 +1573,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base, | |||
1575 | 1573 | ||
1576 | return 0; | 1574 | return 0; |
1577 | } | 1575 | } |
1578 | 1576 | ||
1579 | static int | 1577 | static int |
1580 | setup_wait_descriptor(struct context *ctx) | 1578 | setup_wait_descriptor(struct context *ctx) |
1581 | { | 1579 | { |
@@ -1609,7 +1607,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base, | |||
1609 | dma_addr_t d_bus, page_bus; | 1607 | dma_addr_t d_bus, page_bus; |
1610 | u32 z, header_z, length, rest; | 1608 | u32 z, header_z, length, rest; |
1611 | int page, offset; | 1609 | int page, offset; |
1612 | 1610 | ||
1613 | /* FIXME: Cycle lost behavior should be configurable: lose | 1611 | /* FIXME: Cycle lost behavior should be configurable: lose |
1614 | * packet, retransmit or terminate.. */ | 1612 | * packet, retransmit or terminate.. */ |
1615 | 1613 | ||
@@ -1641,7 +1639,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base, | |||
1641 | db->first_req_count = cpu_to_le16(p->header_length); | 1639 | db->first_req_count = cpu_to_le16(p->header_length); |
1642 | db->first_res_count = db->first_req_count; | 1640 | db->first_res_count = db->first_req_count; |
1643 | db->first_buffer = cpu_to_le32(d_bus + sizeof *db); | 1641 | db->first_buffer = cpu_to_le32(d_bus + sizeof *db); |
1644 | 1642 | ||
1645 | if (offset + rest < PAGE_SIZE) | 1643 | if (offset + rest < PAGE_SIZE) |
1646 | length = rest; | 1644 | length = rest; |
1647 | else | 1645 | else |
@@ -1675,7 +1673,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, | |||
1675 | dma_addr_t d_bus, page_bus; | 1673 | dma_addr_t d_bus, page_bus; |
1676 | u32 length, rest; | 1674 | u32 length, rest; |
1677 | int page, offset; | 1675 | int page, offset; |
1678 | 1676 | ||
1679 | page = payload >> PAGE_SHIFT; | 1677 | page = payload >> PAGE_SHIFT; |
1680 | offset = payload & ~PAGE_MASK; | 1678 | offset = payload & ~PAGE_MASK; |
1681 | rest = packet->payload_length; | 1679 | rest = packet->payload_length; |
@@ -1691,7 +1689,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, | |||
1691 | d->control = cpu_to_le16(descriptor_input_more | | 1689 | d->control = cpu_to_le16(descriptor_input_more | |
1692 | descriptor_status | | 1690 | descriptor_status | |
1693 | descriptor_branch_always); | 1691 | descriptor_branch_always); |
1694 | 1692 | ||
1695 | if (offset + rest < PAGE_SIZE) | 1693 | if (offset + rest < PAGE_SIZE) |
1696 | length = rest; | 1694 | length = rest; |
1697 | else | 1695 | else |