Message ID | 1389604624-8412-1-git-send-email-mika.westerberg@linux.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 483c319188c74e82b29a0ed7a7fa7065570f2193 |
Headers | show |
On Mon, Jan 13, 2014 at 11:17:04AM +0200, Mika Westerberg wrote: > 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. Applied, thanks.
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 7765b1999537..cbc68848789d 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) pdata->num_chipselect = 1; pdata->enable_dma = true; + pdata->tx_chan_id = -1; + pdata->rx_chan_id = -1; return pdata; }
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. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> --- drivers/spi/spi-pxa2xx.c | 2 ++ 1 file changed, 2 insertions(+)