diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-09-14 11:55:37 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-09-25 07:54:05 +0530 |
commit | 87b045969ad3fe021ccbd1ed88e7cb90adf4ca80 (patch) | |
tree | 0ced70395be854ddb0d43139f74919bfdc5cf666 /drivers/dma/idma64.c | |
parent | 9ab8b4e7cacfc4a03e4f39fe8a090436ce456720 (diff) | |
download | linux-87b045969ad3fe021ccbd1ed88e7cb90adf4ca80.tar.gz |
dmaengine: idma64: convert to __ffs()
We replace __fls() by __ffs() since we have to find a *minimum* data width that
satisfies both source and destination.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/idma64.c')
-rw-r--r-- | drivers/dma/idma64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c index 18c14e1f1414..13c52b87d59b 100644 --- a/drivers/dma/idma64.c +++ b/drivers/dma/idma64.c @@ -257,15 +257,15 @@ static u64 idma64_hw_desc_fill(struct idma64_hw_desc *hw, dar = config->dst_addr; ctllo |= IDMA64C_CTLL_DST_FIX | IDMA64C_CTLL_SRC_INC | IDMA64C_CTLL_FC_M2P; - src_width = min_t(u32, 2, __fls(sar | hw->len)); - dst_width = __fls(config->dst_addr_width); + src_width = min_t(u32, 2, __ffs(sar | hw->len)); + dst_width = __ffs(config->dst_addr_width); } else { /* DMA_DEV_TO_MEM */ sar = config->src_addr; dar = hw->phys; ctllo |= IDMA64C_CTLL_DST_INC | IDMA64C_CTLL_SRC_FIX | IDMA64C_CTLL_FC_P2M; - src_width = __fls(config->src_addr_width); - dst_width = min_t(u32, 2, __fls(dar | hw->len)); + src_width = __ffs(config->src_addr_width); + dst_width = min_t(u32, 2, __ffs(dar | hw->len)); } lli->sar = sar; |