From 77927ac4189513c9e43a89600641b3af680c8b30 Mon Sep 17 00:00:00 2001 From: Marcin Mielczarczyk Date: Tue, 18 May 2010 00:41:21 +0200 Subject: [PATCH] --- yaml --- r: 197527 b: refs/heads/master c: 4aed79b2818e7330b5d00143e4c20bc6555df91f h: refs/heads/master i: 197525: 4935b3d681170fb7e21f7ca4a5b40cf934778b53 197523: 5a082a8afaa4c81804d282a9c21726edc3f84341 197519: 7660b8fe929ba4e115b93c394afdf9da113c1c50 v: v3 --- [refs] | 2 +- trunk/drivers/dma/ste_dma40.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 76e70edf7d92..3591b9677c91 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a5ebca4769f28ceade28ff59fcbffb8e184e599c +refs/heads/master: 4aed79b2818e7330b5d00143e4c20bc6555df91f diff --git a/trunk/drivers/dma/ste_dma40.c b/trunk/drivers/dma/ste_dma40.c index 16a7d2b605ed..81fec95312b6 100644 --- a/trunk/drivers/dma/ste_dma40.c +++ b/trunk/drivers/dma/ste_dma40.c @@ -1039,11 +1039,11 @@ static int d40_validate_conf(struct d40_chan *d40c, } static bool d40_alloc_mask_set(struct d40_phy_res *phy, bool is_src, - int log_event_line) + int log_event_line, bool is_log) { unsigned long flags; spin_lock_irqsave(&phy->lock, flags); - if (!log_event_line) { + if (!is_log) { /* Physical interrupts are masked per physical full channel */ if (phy->allocated_src == D40_ALLOC_FREE && phy->allocated_dst == D40_ALLOC_FREE) { @@ -1161,15 +1161,16 @@ static int d40_allocate_channel(struct d40_chan *d40c) /* Find physical half channel */ for (i = 0; i < d40c->base->num_phy_chans; i++) { - if (d40_alloc_mask_set(&phys[i], is_src, 0)) + if (d40_alloc_mask_set(&phys[i], is_src, + 0, is_log)) goto found_phy; } } else for (j = 0; j < d40c->base->num_phy_chans; j += 8) { int phy_num = j + event_group * 2; for (i = phy_num; i < phy_num + 2; i++) { - if (d40_alloc_mask_set(&phys[i], - is_src, 0)) + if (d40_alloc_mask_set(&phys[i], is_src, + 0, is_log)) goto found_phy; } } @@ -1193,13 +1194,13 @@ static int d40_allocate_channel(struct d40_chan *d40c) if (is_src) { for (i = phy_num; i < phy_num + 2; i++) { if (d40_alloc_mask_set(&phys[i], is_src, - event_line)) + event_line, is_log)) goto found_log; } } else { for (i = phy_num + 1; i >= phy_num; i--) { if (d40_alloc_mask_set(&phys[i], is_src, - event_line)) + event_line, is_log)) goto found_log; } }