diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-04-23 02:08:44 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-04-23 02:08:44 +0200 |
commit | 6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1 (patch) | |
tree | 797676a336b050bfa1ef879377c07e541b9075d6 /drivers/spi | |
parent | 4cb3ca7cd7e2cae8d1daf5345ec99a1e8502cf3f (diff) | |
parent | c81eddb0e3728661d1585fbc564449c94165cc36 (diff) | |
download | linux-6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1.tar.gz linux-6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1.tar.bz2 linux-6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1.zip |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/amba-pl022.c | 1 | ||||
-rw-r--r-- | drivers/spi/atmel_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/au1550_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/davinci_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/dw_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/dw_spi_mmio.c | 1 | ||||
-rw-r--r-- | drivers/spi/dw_spi_pci.c | 1 | ||||
-rw-r--r-- | drivers/spi/mpc52xx_psc_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/mpc52xx_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 19 | ||||
-rw-r--r-- | drivers/spi/omap_spi_100k.c | 1 | ||||
-rw-r--r-- | drivers/spi/omap_uwire.c | 1 | ||||
-rw-r--r-- | drivers/spi/pxa2xx_spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_bitbang.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_imx.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_mpc8xxx.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_nuc900.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_ppc4xx.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_s3c24xx.c | 1 | ||||
-rw-r--r-- | drivers/spi/tle62x0.c | 1 | ||||
-rw-r--r-- | drivers/spi/xilinx_spi_of.c | 1 |
23 files changed, 35 insertions, 6 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 9aeb68113100..e9aeee16d922 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c @@ -44,6 +44,7 @@ #include <linux/amba/bus.h> #include <linux/amba/pl022.h> #include <linux/io.h> +#include <linux/slab.h> /* * This macro is used to define some register default values. diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index d21c24eaf0a9..c4e04428992d 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -18,6 +18,7 @@ #include <linux/err.h> #include <linux/interrupt.h> #include <linux/spi/spi.h> +#include <linux/slab.h> #include <asm/io.h> #include <mach/board.h> diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index ba8ac4f599d3..3c9ade69643f 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c @@ -23,6 +23,7 @@ #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/slab.h> #include <linux/errno.h> #include <linux/device.h> #include <linux/platform_device.h> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 225ab60b02c4..95afb6b77395 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -27,6 +27,7 @@ #include <linux/dma-mapping.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> +#include <linux/slab.h> #include <mach/spi.h> #include <mach/edma.h> diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 8ed38f1d6c18..d256cb00604c 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c @@ -21,6 +21,7 @@ #include <linux/interrupt.h> #include <linux/highmem.h> #include <linux/delay.h> +#include <linux/slab.h> #include <linux/spi/dw_spi.h> #include <linux/spi/spi.h> diff --git a/drivers/spi/dw_spi_mmio.c b/drivers/spi/dw_spi_mmio.c index e35b45ac5174..db35bd9c1b24 100644 --- a/drivers/spi/dw_spi_mmio.c +++ b/drivers/spi/dw_spi_mmio.c @@ -11,6 +11,7 @@ #include <linux/clk.h> #include <linux/interrupt.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <linux/spi/dw_spi.h> #include <linux/spi/spi.h> diff --git a/drivers/spi/dw_spi_pci.c b/drivers/spi/dw_spi_pci.c index 1f0735f9cc76..1f52755dc878 100644 --- a/drivers/spi/dw_spi_pci.c +++ b/drivers/spi/dw_spi_pci.c @@ -19,6 +19,7 @@ #include <linux/interrupt.h> #include <linux/pci.h> +#include <linux/slab.h> #include <linux/spi/dw_spi.h> #include <linux/spi/spi.h> diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 04747868d6c4..77d4cc88edea 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c @@ -24,6 +24,7 @@ #include <linux/delay.h> #include <linux/spi/spi.h> #include <linux/fsl_devices.h> +#include <linux/slab.h> #include <asm/mpc52xx.h> #include <asm/mpc52xx_psc.h> diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index 6eab46537a0a..cd68f1ce5cc3 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c @@ -21,6 +21,7 @@ #include <linux/of_spi.h> #include <linux/io.h> #include <linux/of_gpio.h> +#include <linux/slab.h> #include <asm/time.h> #include <asm/mpc52xx.h> diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 715c518b1b68..d8356af118a8 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -32,6 +32,7 @@ #include <linux/err.h> #include <linux/clk.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/spi/spi.h> @@ -578,6 +579,7 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi, struct spi_master *spi_cntrl; u32 l = 0, div = 0; u8 word_len = spi->bits_per_word; + u32 speed_hz = spi->max_speed_hz; mcspi = spi_master_get_devdata(spi->master); spi_cntrl = mcspi->master; @@ -587,9 +589,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi, cs->word_len = word_len; - if (spi->max_speed_hz) { + if (t && t->speed_hz) + speed_hz = t->speed_hz; + + if (speed_hz) { while (div <= 15 && (OMAP2_MCSPI_MAX_FREQ / (1 << div)) - > spi->max_speed_hz) + > speed_hz) div++; } else div = 15; @@ -751,11 +756,13 @@ static void omap2_mcspi_cleanup(struct spi_device *spi) mcspi = spi_master_get_devdata(spi->master); mcspi_dma = &mcspi->dma_channels[spi->chip_select]; - /* Unlink controller state from context save list */ - cs = spi->controller_state; - list_del(&cs->node); + if (spi->controller_state) { + /* Unlink controller state from context save list */ + cs = spi->controller_state; + list_del(&cs->node); - kfree(spi->controller_state); + kfree(spi->controller_state); + } if (mcspi_dma->dma_rx_channel != -1) { omap_free_dma(mcspi_dma->dma_rx_channel); diff --git a/drivers/spi/omap_spi_100k.c b/drivers/spi/omap_spi_100k.c index 5355d90d1bee..24668b30a52d 100644 --- a/drivers/spi/omap_spi_100k.c +++ b/drivers/spi/omap_spi_100k.c @@ -33,6 +33,7 @@ #include <linux/clk.h> #include <linux/io.h> #include <linux/gpio.h> +#include <linux/slab.h> #include <linux/spi/spi.h> diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 6c3a8557db27..160d3266205f 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c @@ -41,6 +41,7 @@ #include <linux/interrupt.h> #include <linux/err.h> #include <linux/clk.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index c2f707e5ce74..36828358a4d8 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c @@ -29,6 +29,7 @@ #include <linux/delay.h> #include <linux/clk.h> #include <linux/gpio.h> +#include <linux/slab.h> #include <asm/io.h> #include <asm/irq.h> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b76f2468a84a..9ffb0fdbd6fe 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -23,6 +23,7 @@ #include <linux/init.h> #include <linux/cache.h> #include <linux/mutex.h> +#include <linux/slab.h> #include <linux/mod_devicetable.h> #include <linux/spi/spi.h> diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 1d41058bbab2..10a6dc3d37ac 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/delay.h> #include <linux/device.h> +#include <linux/slab.h> #include <linux/io.h> #include <linux/ioport.h> #include <linux/irq.h> diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index f1db395dd889..5265330a528f 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -23,6 +23,7 @@ #include <linux/delay.h> #include <linux/errno.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 0ddbbe45e834..7972e9077473 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -30,6 +30,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> #include <linux/types.h> diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 56efdfe1428d..e324627d97a2 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -39,6 +39,7 @@ #include <linux/gpio.h> #include <linux/of_gpio.h> #include <linux/of_spi.h> +#include <linux/slab.h> #include <sysdev/fsl_soc.h> #include <asm/cpm.h> diff --git a/drivers/spi/spi_nuc900.c b/drivers/spi/spi_nuc900.c index b319f9bf9b9b..dff63be0d0a8 100644 --- a/drivers/spi/spi_nuc900.c +++ b/drivers/spi/spi_nuc900.c @@ -21,6 +21,7 @@ #include <linux/platform_device.h> #include <linux/gpio.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c index 6d8d4026a07a..7cb5ff37f6e2 100644 --- a/drivers/spi/spi_ppc4xx.c +++ b/drivers/spi/spi_ppc4xx.c @@ -26,6 +26,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/slab.h> #include <linux/errno.h> #include <linux/wait.h> #include <linux/of_platform.h> diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 1fabede9e061..151a95e40653 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -21,6 +21,7 @@ #include <linux/platform_device.h> #include <linux/gpio.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/spi_bitbang.h> diff --git a/drivers/spi/tle62x0.c b/drivers/spi/tle62x0.c index bf9540f5fb98..a3938958147c 100644 --- a/drivers/spi/tle62x0.c +++ b/drivers/spi/tle62x0.c @@ -11,6 +11,7 @@ #include <linux/device.h> #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/spi/spi.h> #include <linux/spi/tle62x0.h> diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c index ed34a8d419c7..748d33a76d29 100644 --- a/drivers/spi/xilinx_spi_of.c +++ b/drivers/spi/xilinx_spi_of.c @@ -27,6 +27,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/slab.h> #include <linux/of_platform.h> #include <linux/of_device.h> |