mmc: sdhi: DMA slave ID 0 is invalid
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 24 May 2011 10:24:07 +0000 (12:24 +0200)
committerChris Ball <cjb@laptop.org>
Sat, 25 Jun 2011 22:52:20 +0000 (18:52 -0400)
Don't try to allocate DMA resources if the platform didn't specify
positive DMA slave IDs.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sh_mobile_sdhi.c

index 2353bb797d6c64789663fe13aa9f4cb57ff195b6..ce500f03df859a6f9af275461d7ef29515aedb4e 100644 (file)
@@ -92,7 +92,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;