aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2012-03-18 14:03:26 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-03-18 17:15:38 -0400
commit90fcc8987390bffd79c6fd16aa59cc6ef549efcb (patch)
tree06a8ea8088e6fe0128f00637e03abe275261e59e /drivers/firewire
parentb9b5bbfda61c1d202dd943dddca8cdf617863fb9 (diff)
firewire: ohci: optimize control bit checks
Doing the endian conversion on the constant instead of the memory field allows the compiler to do the conversion at compile time. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/ohci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 588a72892ff1..a2fc64cd8b81 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2728,7 +2728,7 @@ static int handle_ir_packet_per_buffer(struct context *context,
2728 p = last + 1; 2728 p = last + 1;
2729 copy_iso_headers(ctx, p); 2729 copy_iso_headers(ctx, p);
2730 2730
2731 if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) { 2731 if (last->control & cpu_to_le16(DESCRIPTOR_IRQ_ALWAYS)) {
2732 ir_header = (__le32 *) p; 2732 ir_header = (__le32 *) p;
2733 ctx->base.callback.sc(&ctx->base, 2733 ctx->base.callback.sc(&ctx->base,
2734 le32_to_cpu(ir_header[0]) & 0xffff, 2734 le32_to_cpu(ir_header[0]) & 0xffff,
@@ -2760,7 +2760,7 @@ static int handle_ir_buffer_fill(struct context *context,
2760 le16_to_cpu(last->req_count), 2760 le16_to_cpu(last->req_count),
2761 DMA_FROM_DEVICE); 2761 DMA_FROM_DEVICE);
2762 2762
2763 if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) 2763 if (last->control & cpu_to_le16(DESCRIPTOR_IRQ_ALWAYS))
2764 ctx->base.callback.mc(&ctx->base, 2764 ctx->base.callback.mc(&ctx->base,
2765 le32_to_cpu(last->data_address) + 2765 le32_to_cpu(last->data_address) +
2766 le16_to_cpu(last->req_count), 2766 le16_to_cpu(last->req_count),
@@ -2832,7 +2832,7 @@ static int handle_it_packet(struct context *context,
2832 le16_to_cpu(pd->res_count)); 2832 le16_to_cpu(pd->res_count));
2833 ctx->header_length += 4; 2833 ctx->header_length += 4;
2834 } 2834 }
2835 if (le16_to_cpu(last->control) & DESCRIPTOR_IRQ_ALWAYS) { 2835 if (last->control & cpu_to_le16(DESCRIPTOR_IRQ_ALWAYS)) {
2836 ctx->base.callback.sc(&ctx->base, le16_to_cpu(last->res_count), 2836 ctx->base.callback.sc(&ctx->base, le16_to_cpu(last->res_count),
2837 ctx->header_length, ctx->header, 2837 ctx->header_length, ctx->header,
2838 ctx->base.callback_data); 2838 ctx->base.callback_data);