From patchwork Fri Jan 13 03:09:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6174 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 397B423E14 for ; Fri, 13 Jan 2012 03:10:22 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 23333A185EB for ; Fri, 13 Jan 2012 03:10:22 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id zu5so2430515bkb.11 for ; Thu, 12 Jan 2012 19:10:22 -0800 (PST) Received: by 10.205.139.66 with SMTP id iv2mr68880bkc.27.1326424221932; Thu, 12 Jan 2012 19:10:21 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs19806bkc; Thu, 12 Jan 2012 19:10:21 -0800 (PST) Received: by 10.68.192.39 with SMTP id hd7mr1730176pbc.80.1326424219481; Thu, 12 Jan 2012 19:10:19 -0800 (PST) Received: from VA3EHSOBE010.bigfish.com (va3ehsobe010.messaging.microsoft.com. [216.32.180.30]) by mx.google.com with ESMTPS id g9si10121439pbj.131.2012.01.12.19.10.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jan 2012 19:10:19 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.30 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.30; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.30 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail157-va3-R.bigfish.com (10.7.14.240) by VA3EHSOBE010.bigfish.com (10.7.40.12) with Microsoft SMTP Server id 14.1.225.22; Fri, 13 Jan 2012 03:10:18 +0000 Received: from mail157-va3 (localhost [127.0.0.1]) by mail157-va3-R.bigfish.com (Postfix) with ESMTP id B89621E0474; Fri, 13 Jan 2012 03:10:17 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dhc1ahc1bh87h2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail157-va3 (localhost.localdomain [127.0.0.1]) by mail157-va3 (MessageSwitch) id 1326424216900079_16054; Fri, 13 Jan 2012 03:10:16 +0000 (UTC) Received: from VA3EHSMHS036.bigfish.com (unknown [10.7.14.244]) by mail157-va3.bigfish.com (Postfix) with ESMTP id D1F051C004F; Fri, 13 Jan 2012 03:10:16 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS036.bigfish.com (10.7.99.46) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 13 Jan 2012 03:10:16 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.355.3; Thu, 12 Jan 2012 21:10:16 -0600 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q0D3A36S003861; Thu, 12 Jan 2012 21:10:13 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH v2 3/6] dma/imx-sdma: call sdma_set_channel_priority after sdma_request_channel Date: Fri, 13 Jan 2012 11:09:58 +0800 Message-ID: <1326424201-20056-4-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1326424201-20056-1-git-send-email-richard.zhao@linaro.org> References: <1326424201-20056-1-git-send-email-richard.zhao@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com sdma_request_channel sets the default priority. sdma_alloc_chan_resources should call sdma_set_channel_priority thereafter to over write it. Signed-off-by: Richard Zhao Acked-by: Shawn Guo --- drivers/dma/imx-sdma.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 63f4752..b40f630 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -875,11 +875,11 @@ static int sdma_alloc_chan_resources(struct dma_chan *chan) sdmac->peripheral_type = data->peripheral_type; sdmac->event_id0 = data->dma_request; - ret = sdma_set_channel_priority(sdmac, prio); + ret = sdma_request_channel(sdmac); if (ret) return ret; - ret = sdma_request_channel(sdmac); + ret = sdma_set_channel_priority(sdmac, prio); if (ret) return ret;