From patchwork Tue May 24 10:24:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 811462 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4OAO6xG016426 for ; Tue, 24 May 2011 10:24:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753717Ab1EXKYQ (ORCPT ); Tue, 24 May 2011 06:24:16 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:63340 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412Ab1EXKYP (ORCPT ); Tue, 24 May 2011 06:24:15 -0400 Received: from axis700.grange (dslb-094-221-030-047.pools.arcor-ip.net [94.221.30.47]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MTMxT-1QGOBM3ZWp-00S0sL; Tue, 24 May 2011 12:24:08 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 6BD9B189B6D; Tue, 24 May 2011 12:24:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 68BBB189B6B; Tue, 24 May 2011 12:24:07 +0200 (CEST) Date: Tue, 24 May 2011 12:24:07 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-mmc@vger.kernel.org, Simon Horman , Magnus Damm , Ian Molton , Dan Williams , Vinod Koul Subject: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:nJUliJrDAOaUEk2Dl0unVe/jcGIxoHIx+QUmF5isA2c nfw0O6CMFjykgpDBF9pwHdt9EEf4dyC6/ZKgZgHZ3A0JtYNtOS Hbaciz233zFv6FubvbFSpqCNxE8kTe/b8S4UyBZAhBGUUK8Jhl P1MS0ZnXtKgyZCMOIQgZVFpZAQNwP2X9pKRPs8pb1EHqhN8PIl 9JXoIhdyVoaz757z4OtraXfA5oQ/j/sK7edZOoTyb8= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 24 May 2011 10:24:17 +0000 (UTC) Don't try to allocate DMA resources, if the platform didn't specify positive DMA slave IDs. Signed-off-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mobile_sdhi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index c05d699..e646741 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -132,7 +132,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data->ocr_mask = p->tmio_ocr_mask; mmc_data->capabilities |= p->tmio_caps; - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) { priv->param_tx.slave_id = p->dma_slave_tx; priv->param_rx.slave_id = p->dma_slave_rx; priv->dma_priv.chan_priv_tx = &priv->param_tx;