From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754622Ab3AJIz4 (ORCPT ); Thu, 10 Jan 2013 03:55:56 -0500 Received: from mga03.intel.com ([143.182.124.21]:19640 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753265Ab3AJIxW (ORCPT ); Thu, 10 Jan 2013 03:53:22 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,443,1355126400"; d="scan'208";a="242196009" From: Andy Shevchenko To: Vinod Koul , linux-kernel@vger.kernel.org, Viresh Kumar , spear-devel Subject: [PATCHv2 05/11] dma: ipu_idmac: reuse is_slave_direction helper Date: Thu, 10 Jan 2013 10:53:00 +0200 Message-Id: <1357807986-4026-6-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1357807986-4026-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1357807986-4026-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The is_slave_direction helps to check if the transfer type is slave. Signed-off-by: Andy Shevchenko Reviewed-by: Viresh Kumar Cc: Guennadi Liakhovetski --- drivers/dma/ipu/ipu_idmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 6585537..8c61d17 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -1347,7 +1347,7 @@ static struct dma_async_tx_descriptor *idmac_prep_slave_sg(struct dma_chan *chan chan->chan_id != IDMAC_IC_7) return NULL; - if (direction != DMA_DEV_TO_MEM && direction != DMA_MEM_TO_DEV) { + if (!is_slave_direction(direction)) { dev_err(chan->device->dev, "Invalid DMA direction %d!\n", direction); return NULL; } -- 1.7.10.4