Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull SPI bug fixes from Grant Likely:
"Miscellaneous driver bug fixes. No major changes in this branch."

* tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
spi/imx: prevent NULL pointer dereference in spi_imx_probe()
spi/imx: mark base member in spi_imx_data as __iomem
spi/mpc83xx: fix NULL pdata dereference bug
spi/davinci: Fix DMA API usage in davinci
spi/pL022: include types.h to remove compilation warnings

+16 -8
+3 -3
drivers/spi/spi-davinci.c
··· 653 653 dev_dbg(sdev, "Couldn't DMA map a %d bytes RX buffer\n", 654 654 rx_buf_count); 655 655 if (t->tx_buf) 656 - dma_unmap_single(NULL, t->tx_dma, t->len, 656 + dma_unmap_single(&spi->dev, t->tx_dma, t->len, 657 657 DMA_TO_DEVICE); 658 658 return -ENOMEM; 659 659 } ··· 692 692 if (spicfg->io_type == SPI_IO_TYPE_DMA) { 693 693 694 694 if (t->tx_buf) 695 - dma_unmap_single(NULL, t->tx_dma, t->len, 695 + dma_unmap_single(&spi->dev, t->tx_dma, t->len, 696 696 DMA_TO_DEVICE); 697 697 698 - dma_unmap_single(NULL, t->rx_dma, rx_buf_count, 698 + dma_unmap_single(&spi->dev, t->rx_dma, rx_buf_count, 699 699 DMA_FROM_DEVICE); 700 700 701 701 clear_io_bits(dspi->base + SPIINT, SPIINT_DMA_REQ_EN);
+3 -1
drivers/spi/spi-fsl-spi.c
··· 139 139 static void fsl_spi_chipselect(struct spi_device *spi, int value) 140 140 { 141 141 struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); 142 - struct fsl_spi_platform_data *pdata = spi->dev.parent->platform_data; 142 + struct fsl_spi_platform_data *pdata; 143 143 bool pol = spi->mode & SPI_CS_HIGH; 144 144 struct spi_mpc8xxx_cs *cs = spi->controller_state; 145 + 146 + pdata = spi->dev.parent->parent->platform_data; 145 147 146 148 if (value == BITBANG_CS_INACTIVE) { 147 149 if (pdata->cs_control)
+8 -4
drivers/spi/spi-imx.c
··· 83 83 struct spi_bitbang bitbang; 84 84 85 85 struct completion xfer_done; 86 - void *base; 86 + void __iomem *base; 87 87 int irq; 88 88 struct clk *clk; 89 89 unsigned long spi_clk; ··· 766 766 } 767 767 768 768 ret = of_property_read_u32(np, "fsl,spi-num-chipselects", &num_cs); 769 - if (ret < 0) 770 - num_cs = mxc_platform_info->num_chipselect; 769 + if (ret < 0) { 770 + if (mxc_platform_info) 771 + num_cs = mxc_platform_info->num_chipselect; 772 + else 773 + return ret; 774 + } 771 775 772 776 master = spi_alloc_master(&pdev->dev, 773 777 sizeof(struct spi_imx_data) + sizeof(int) * num_cs); ··· 788 784 789 785 for (i = 0; i < master->num_chipselect; i++) { 790 786 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i); 791 - if (cs_gpio < 0) 787 + if (cs_gpio < 0 && mxc_platform_info) 792 788 cs_gpio = mxc_platform_info->chipselect[i]; 793 789 794 790 spi_imx->chipselect[i] = cs_gpio;
+2
include/linux/amba/pl022.h
··· 25 25 #ifndef _SSP_PL022_H 26 26 #define _SSP_PL022_H 27 27 28 + #include <linux/types.h> 29 + 28 30 /** 29 31 * whether SSP is in loopback mode or not 30 32 */