Skip to content

Commit

Permalink
mmc: sdhi: DMA slave ID 0 is invalid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Chris Ball committed Jun 25, 2011
1 parent 7d8b4c2 commit 3e71337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/sh_mobile_sdhi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3e71337

Please sign in to comment.