summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2011-01-01 15:17:05 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2011-01-04 08:48:33 +0100
commit693a50b511818e07a131efc944cba1a504b63d3d (patch)
treef2791e96a50e10ec07223a9aa3b0719768221ca8 /drivers/firewire
parent386a4153a2c1455e424f280d636efa3c91864466 (diff)
downloadblackbird-op-linux-693a50b511818e07a131efc944cba1a504b63d3d.tar.gz
blackbird-op-linux-693a50b511818e07a131efc944cba1a504b63d3d.zip
firewire: ohci: consolidate context status flags
"firewire: ohci: restart iso DMA contexts on resume from low power mode" added the flag struct context.active and "firewire: ohci: cache the context run bit" added struct context.running. These flags contain the same information; combine them. Also, normalize whitespace in pci_resume(). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/ohci.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 3ae84e2c5192..d77d120ddc25 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -156,7 +156,6 @@ struct context {
descriptor_callback_t callback;
struct tasklet_struct tasklet;
- bool active;
};
#define IT_HEADER_SY(v) ((v) << 0)
@@ -1169,7 +1168,6 @@ static struct descriptor *context_get_descriptors(struct context *ctx,
static void context_run(struct context *ctx, u32 extra)
{
struct fw_ohci *ohci = ctx->ohci;
- ctx->active = true;
reg_write(ohci, COMMAND_PTR(ctx->regs),
le32_to_cpu(ctx->last->branch_address));
@@ -1202,7 +1200,6 @@ static void context_stop(struct context *ctx)
u32 reg;
int i;
- ctx->active = false;
reg_write(ctx->ohci, CONTROL_CLEAR(ctx->regs), CONTEXT_RUN);
ctx->running = false;
flush_writes(ctx->ohci);
@@ -2797,13 +2794,13 @@ static void ohci_resume_iso_dma(struct fw_ohci *ohci)
for (i = 0 ; i < ohci->n_ir ; i++) {
ctx = &ohci->ir_context_list[i];
- if (ctx->context.active)
+ if (ctx->context.running)
ohci_start_iso(&ctx->base, 0, ctx->sync, ctx->tags);
}
for (i = 0 ; i < ohci->n_it ; i++) {
ctx = &ohci->it_context_list[i];
- if (ctx->context.active)
+ if (ctx->context.running)
ohci_start_iso(&ctx->base, 0, ctx->sync, ctx->tags);
}
}
@@ -3363,11 +3360,11 @@ static int pci_resume(struct pci_dev *dev)
}
err = ohci_enable(&ohci->card, NULL, 0);
-
if (err)
return err;
ohci_resume_iso_dma(ohci);
+
return 0;
}
#endif
OpenPOWER on IntegriCloud