Commit 693a50b511818e07a131efc944cba1a504b63d3d
1 parent
386a4153a2
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 3 additions and 6 deletions Side-by-side Diff
drivers/firewire/ohci.c
... | ... | @@ -156,7 +156,6 @@ |
156 | 156 | descriptor_callback_t callback; |
157 | 157 | |
158 | 158 | struct tasklet_struct tasklet; |
159 | - bool active; | |
160 | 159 | }; |
161 | 160 | |
162 | 161 | #define IT_HEADER_SY(v) ((v) << 0) |
... | ... | @@ -1169,7 +1168,6 @@ |
1169 | 1168 | static void context_run(struct context *ctx, u32 extra) |
1170 | 1169 | { |
1171 | 1170 | struct fw_ohci *ohci = ctx->ohci; |
1172 | - ctx->active = true; | |
1173 | 1171 | |
1174 | 1172 | reg_write(ohci, COMMAND_PTR(ctx->regs), |
1175 | 1173 | le32_to_cpu(ctx->last->branch_address)); |
... | ... | @@ -1202,7 +1200,6 @@ |
1202 | 1200 | u32 reg; |
1203 | 1201 | int i; |
1204 | 1202 | |
1205 | - ctx->active = false; | |
1206 | 1203 | reg_write(ctx->ohci, CONTROL_CLEAR(ctx->regs), CONTEXT_RUN); |
1207 | 1204 | ctx->running = false; |
1208 | 1205 | flush_writes(ctx->ohci); |
1209 | 1206 | |
... | ... | @@ -2797,13 +2794,13 @@ |
2797 | 2794 | |
2798 | 2795 | for (i = 0 ; i < ohci->n_ir ; i++) { |
2799 | 2796 | ctx = &ohci->ir_context_list[i]; |
2800 | - if (ctx->context.active) | |
2797 | + if (ctx->context.running) | |
2801 | 2798 | ohci_start_iso(&ctx->base, 0, ctx->sync, ctx->tags); |
2802 | 2799 | } |
2803 | 2800 | |
2804 | 2801 | for (i = 0 ; i < ohci->n_it ; i++) { |
2805 | 2802 | ctx = &ohci->it_context_list[i]; |
2806 | - if (ctx->context.active) | |
2803 | + if (ctx->context.running) | |
2807 | 2804 | ohci_start_iso(&ctx->base, 0, ctx->sync, ctx->tags); |
2808 | 2805 | } |
2809 | 2806 | } |
2810 | 2807 | |
... | ... | @@ -3363,11 +3360,11 @@ |
3363 | 3360 | } |
3364 | 3361 | |
3365 | 3362 | err = ohci_enable(&ohci->card, NULL, 0); |
3366 | - | |
3367 | 3363 | if (err) |
3368 | 3364 | return err; |
3369 | 3365 | |
3370 | 3366 | ohci_resume_iso_dma(ohci); |
3367 | + | |
3371 | 3368 | return 0; |
3372 | 3369 | } |
3373 | 3370 | #endif |