aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-12-14 15:45:45 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:39 -0400
commit2dbd7d7e2327b0c2cc4e2de903e1cfa19980a504 (patch)
treec0efb5bbd26bc2e18a61bf44d0c53db9494a096c /drivers/firewire/fw-ohci.c
parentc490a6dec6cc1b7f0eab56b9fbd565129b3dea2e (diff)
firewire: standardize a variable name
"ret" is the new "retval". Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-ohci.c')
-rw-r--r--drivers/firewire/fw-ohci.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index bbfd6cdac668..b941ab3da18e 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1209,7 +1209,7 @@ static void
1209at_context_transmit(struct context *ctx, struct fw_packet *packet) 1209at_context_transmit(struct context *ctx, struct fw_packet *packet)
1210{ 1210{
1211 unsigned long flags; 1211 unsigned long flags;
1212 int retval; 1212 int ret;
1213 1213
1214 spin_lock_irqsave(&ctx->ohci->lock, flags); 1214 spin_lock_irqsave(&ctx->ohci->lock, flags);
1215 1215
@@ -1220,10 +1220,10 @@ at_context_transmit(struct context *ctx, struct fw_packet *packet)
1220 return; 1220 return;
1221 } 1221 }
1222 1222
1223 retval = at_context_queue_packet(ctx, packet); 1223 ret = at_context_queue_packet(ctx, packet);
1224 spin_unlock_irqrestore(&ctx->ohci->lock, flags); 1224 spin_unlock_irqrestore(&ctx->ohci->lock, flags);
1225 1225
1226 if (retval < 0) 1226 if (ret < 0)
1227 packet->callback(packet, &ctx->ohci->card, packet->ack); 1227 packet->callback(packet, &ctx->ohci->card, packet->ack);
1228 1228
1229} 1229}
@@ -1595,7 +1595,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
1595{ 1595{
1596 struct fw_ohci *ohci; 1596 struct fw_ohci *ohci;
1597 unsigned long flags; 1597 unsigned long flags;
1598 int retval = -EBUSY; 1598 int ret = -EBUSY;
1599 __be32 *next_config_rom; 1599 __be32 *next_config_rom;
1600 dma_addr_t uninitialized_var(next_config_rom_bus); 1600 dma_addr_t uninitialized_var(next_config_rom_bus);
1601 1601
@@ -1649,7 +1649,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
1649 1649
1650 reg_write(ohci, OHCI1394_ConfigROMmap, 1650 reg_write(ohci, OHCI1394_ConfigROMmap,
1651 ohci->next_config_rom_bus); 1651 ohci->next_config_rom_bus);
1652 retval = 0; 1652 ret = 0;
1653 } 1653 }
1654 1654
1655 spin_unlock_irqrestore(&ohci->lock, flags); 1655 spin_unlock_irqrestore(&ohci->lock, flags);
@@ -1661,13 +1661,13 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
1661 * controller could need to access it before the bus reset 1661 * controller could need to access it before the bus reset
1662 * takes effect. 1662 * takes effect.
1663 */ 1663 */
1664 if (retval == 0) 1664 if (ret == 0)
1665 fw_core_initiate_bus_reset(&ohci->card, 1); 1665 fw_core_initiate_bus_reset(&ohci->card, 1);
1666 else 1666 else
1667 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 1667 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
1668 next_config_rom, next_config_rom_bus); 1668 next_config_rom, next_config_rom_bus);
1669 1669
1670 return retval; 1670 return ret;
1671} 1671}
1672 1672
1673static void ohci_send_request(struct fw_card *card, struct fw_packet *packet) 1673static void ohci_send_request(struct fw_card *card, struct fw_packet *packet)
@@ -1689,7 +1689,7 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
1689 struct fw_ohci *ohci = fw_ohci(card); 1689 struct fw_ohci *ohci = fw_ohci(card);
1690 struct context *ctx = &ohci->at_request_ctx; 1690 struct context *ctx = &ohci->at_request_ctx;
1691 struct driver_data *driver_data = packet->driver_data; 1691 struct driver_data *driver_data = packet->driver_data;
1692 int retval = -ENOENT; 1692 int ret = -ENOENT;
1693 1693
1694 tasklet_disable(&ctx->tasklet); 1694 tasklet_disable(&ctx->tasklet);
1695 1695
@@ -1704,12 +1704,11 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
1704 driver_data->packet = NULL; 1704 driver_data->packet = NULL;
1705 packet->ack = RCODE_CANCELLED; 1705 packet->ack = RCODE_CANCELLED;
1706 packet->callback(packet, &ohci->card, packet->ack); 1706 packet->callback(packet, &ohci->card, packet->ack);
1707 retval = 0; 1707 ret = 0;
1708
1709 out: 1708 out:
1710 tasklet_enable(&ctx->tasklet); 1709 tasklet_enable(&ctx->tasklet);
1711 1710
1712 return retval; 1711 return ret;
1713} 1712}
1714 1713
1715static int 1714static int
@@ -1720,7 +1719,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
1720#else 1719#else
1721 struct fw_ohci *ohci = fw_ohci(card); 1720 struct fw_ohci *ohci = fw_ohci(card);
1722 unsigned long flags; 1721 unsigned long flags;
1723 int n, retval = 0; 1722 int n, ret = 0;
1724 1723
1725 /* 1724 /*
1726 * FIXME: Make sure this bitmask is cleared when we clear the busReset 1725 * FIXME: Make sure this bitmask is cleared when we clear the busReset
@@ -1730,7 +1729,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
1730 spin_lock_irqsave(&ohci->lock, flags); 1729 spin_lock_irqsave(&ohci->lock, flags);
1731 1730
1732 if (ohci->generation != generation) { 1731 if (ohci->generation != generation) {
1733 retval = -ESTALE; 1732 ret = -ESTALE;
1734 goto out; 1733 goto out;
1735 } 1734 }
1736 1735
@@ -1748,7 +1747,8 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
1748 flush_writes(ohci); 1747 flush_writes(ohci);
1749 out: 1748 out:
1750 spin_unlock_irqrestore(&ohci->lock, flags); 1749 spin_unlock_irqrestore(&ohci->lock, flags);
1751 return retval; 1750
1751 return ret;
1752#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */ 1752#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */
1753} 1753}
1754 1754
@@ -1892,7 +1892,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
1892 descriptor_callback_t callback; 1892 descriptor_callback_t callback;
1893 u32 *mask, regs; 1893 u32 *mask, regs;
1894 unsigned long flags; 1894 unsigned long flags;
1895 int index, retval = -ENOMEM; 1895 int index, ret = -ENOMEM;
1896 1896
1897 if (type == FW_ISO_CONTEXT_TRANSMIT) { 1897 if (type == FW_ISO_CONTEXT_TRANSMIT) {
1898 mask = &ohci->it_context_mask; 1898 mask = &ohci->it_context_mask;
@@ -1928,8 +1928,8 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
1928 if (ctx->header == NULL) 1928 if (ctx->header == NULL)
1929 goto out; 1929 goto out;
1930 1930
1931 retval = context_init(&ctx->context, ohci, regs, callback); 1931 ret = context_init(&ctx->context, ohci, regs, callback);
1932 if (retval < 0) 1932 if (ret < 0)
1933 goto out_with_header; 1933 goto out_with_header;
1934 1934
1935 return &ctx->base; 1935 return &ctx->base;
@@ -1941,7 +1941,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type, size_t header_size)
1941 *mask |= 1 << index; 1941 *mask |= 1 << index;
1942 spin_unlock_irqrestore(&ohci->lock, flags); 1942 spin_unlock_irqrestore(&ohci->lock, flags);
1943 1943
1944 return ERR_PTR(retval); 1944 return ERR_PTR(ret);
1945} 1945}
1946 1946
1947static int ohci_start_iso(struct fw_iso_context *base, 1947static int ohci_start_iso(struct fw_iso_context *base,
@@ -2291,21 +2291,20 @@ ohci_queue_iso(struct fw_iso_context *base,
2291{ 2291{
2292 struct iso_context *ctx = container_of(base, struct iso_context, base); 2292 struct iso_context *ctx = container_of(base, struct iso_context, base);
2293 unsigned long flags; 2293 unsigned long flags;
2294 int retval; 2294 int ret;
2295 2295
2296 spin_lock_irqsave(&ctx->context.ohci->lock, flags); 2296 spin_lock_irqsave(&ctx->context.ohci->lock, flags);
2297 if (base->type == FW_ISO_CONTEXT_TRANSMIT) 2297 if (base->type == FW_ISO_CONTEXT_TRANSMIT)
2298 retval = ohci_queue_iso_transmit(base, packet, buffer, payload); 2298 ret = ohci_queue_iso_transmit(base, packet, buffer, payload);
2299 else if (ctx->context.ohci->use_dualbuffer) 2299 else if (ctx->context.ohci->use_dualbuffer)
2300 retval = ohci_queue_iso_receive_dualbuffer(base, packet, 2300 ret = ohci_queue_iso_receive_dualbuffer(base, packet,
2301 buffer, payload); 2301 buffer, payload);
2302 else 2302 else
2303 retval = ohci_queue_iso_receive_packet_per_buffer(base, packet, 2303 ret = ohci_queue_iso_receive_packet_per_buffer(base, packet,
2304 buffer, 2304 buffer, payload);
2305 payload);
2306 spin_unlock_irqrestore(&ctx->context.ohci->lock, flags); 2305 spin_unlock_irqrestore(&ctx->context.ohci->lock, flags);
2307 2306
2308 return retval; 2307 return ret;
2309} 2308}
2310 2309
2311static const struct fw_card_driver ohci_driver = { 2310static const struct fw_card_driver ohci_driver = {