From patchwork Mon Mar 2 23:28:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 5918151 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 01C7C9F373 for ; Mon, 2 Mar 2015 23:28:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 344502024F for ; Mon, 2 Mar 2015 23:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E95020212 for ; Mon, 2 Mar 2015 23:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754370AbbCBX2i (ORCPT ); Mon, 2 Mar 2015 18:28:38 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:40814 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944AbbCBX2i (ORCPT ); Mon, 2 Mar 2015 18:28:38 -0500 Received: from trochilidae.agner.local (195-226-23-137.pool.cyberlink.ch [195.226.23.137]) by mail.kmu-office.ch (Postfix) with ESMTPSA id B572C5C0B54; Tue, 3 Mar 2015 00:28:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=agner.ch; s=dkim; t=1425338912; bh=7qYzsSSdUbos3nMjLVo0XoeLrtuKcuuH7UBo07eQGg8=; h=From:To:Cc:Subject:Date:From; b=qNkIhY5mK14Gjc2OFch5dMiFgYbKo68x+ZeprUj8Ry6aHaD5nHkTTPyDA+H5COCH4 pZgspRgmzCJq1xEXU33BCKIrk6X/Hpt5XPoTKIg+4dJzAvPyHtO9uFc/byzjzAWO2p ux8ZBxUFYrUvXKdog8sTZjmr3V0TRvc8VcUE/RcI= From: Stefan Agner To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, llvmlinux@lists.linuxfoundation.org, stefan@agner.ch Subject: [PATCH] spi: spi-imx: use correct enumeration type Date: Tue, 3 Mar 2015 00:28:31 +0100 Message-Id: <1425338911-11407-1-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.3.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The fourth argument of dmaengine_prep_slave_sg needs to be of the enumeration type dma_transfer_direction instead of dma_data_direction. Since the used enumeration values actually stay the same, this is not an actual issue at runtime. Signed-off-by: Stefan Agner --- This showed up when I tried using LLVM/clang to build a kernel for a Freescale Vybrid based board. drivers/spi/spi-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 961b97d..220f566 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -899,7 +899,7 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx, if (tx) { desc_tx = dmaengine_prep_slave_sg(master->dma_tx, - tx->sgl, tx->nents, DMA_TO_DEVICE, + tx->sgl, tx->nents, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc_tx) goto no_dma; @@ -911,7 +911,7 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx, if (rx) { desc_rx = dmaengine_prep_slave_sg(master->dma_rx, - rx->sgl, rx->nents, DMA_FROM_DEVICE, + rx->sgl, rx->nents, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc_rx) goto no_dma;