From patchwork Mon Jan 9 08:48:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6103 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 3CA2423E07 for ; Mon, 9 Jan 2012 08:49:33 +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 2C8E6A1811E for ; Mon, 9 Jan 2012 08:49:33 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id 17so1903659bke.11 for ; Mon, 09 Jan 2012 00:49:33 -0800 (PST) Received: by 10.204.153.27 with SMTP id i27mr6816146bkw.81.1326098972927; Mon, 09 Jan 2012 00:49:32 -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 ac16cs49503bkc; Mon, 9 Jan 2012 00:49:32 -0800 (PST) Received: by 10.68.115.40 with SMTP id jl8mr6440586pbb.94.1326098970715; Mon, 09 Jan 2012 00:49:30 -0800 (PST) Received: from TX2EHSOBE006.bigfish.com (tx2ehsobe003.messaging.microsoft.com. [65.55.88.13]) by mx.google.com with ESMTPS id l9si72357851pbi.205.2012.01.09.00.49.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jan 2012 00:49:30 -0800 (PST) Received-SPF: neutral (google.com: 65.55.88.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=65.55.88.13; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.55.88.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail159-tx2-R.bigfish.com (10.9.14.240) by TX2EHSOBE006.bigfish.com (10.9.40.26) with Microsoft SMTP Server id 14.1.225.23; Mon, 9 Jan 2012 08:49:28 +0000 Received: from mail159-tx2 (localhost [127.0.0.1]) by mail159-tx2-R.bigfish.com (Postfix) with ESMTP id ABAE74C015B; Mon, 9 Jan 2012 08:49:26 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h62h) 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 mail159-tx2 (localhost.localdomain [127.0.0.1]) by mail159-tx2 (MessageSwitch) id 1326098965315702_13477; Mon, 9 Jan 2012 08:49:25 +0000 (UTC) Received: from TX2EHSMHS004.bigfish.com (unknown [10.9.14.248]) by mail159-tx2.bigfish.com (Postfix) with ESMTP id 45B7E6A0042; Mon, 9 Jan 2012 08:49:25 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS004.bigfish.com (10.9.99.104) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 9 Jan 2012 08:49:27 +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; Mon, 9 Jan 2012 02:49:14 -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 q098nAEU027791; Mon, 9 Jan 2012 02:49:11 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH 1/2] dma/imx-sdma: call sdma_set_channel_priority after sdma_request_channel Date: Mon, 9 Jan 2012 16:48:59 +0800 Message-ID: <1326098940-3697-1-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 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 2cc96c4..6376009 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;