diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-01-13 04:17:04 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-13 07:39:19 -0500 |
commit | 483c319188c74e82b29a0ed7a7fa7065570f2193 (patch) | |
tree | 6654f08957d355235eff55a8c36afde2745e1e21 | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) |
spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match
Commit cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
converted the driver to use ACPI provided DMA helpers but it forgot to
initialize the platform data for the channels to -1. Failing to do so will
result inadvertent match in the filter function because 0 is a valid
channel number.
Prevent this from happening by initializing both platform data channels
correctly to -1.
Fixes: cddb339badb0 (spi/pxa2xx: convert to dma_request_slave_channel_compat())
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index cb0e1f1137ad..91815fa2d2fe 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
@@ -1066,6 +1066,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev) | |||
1066 | 1066 | ||
1067 | pdata->num_chipselect = 1; | 1067 | pdata->num_chipselect = 1; |
1068 | pdata->enable_dma = true; | 1068 | pdata->enable_dma = true; |
1069 | pdata->tx_chan_id = -1; | ||
1070 | pdata->rx_chan_id = -1; | ||
1069 | 1071 | ||
1070 | return pdata; | 1072 | return pdata; |
1071 | } | 1073 | } |