diff options
author | John Crispin <john@openwrt.org> | 2015-07-17 12:48:39 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-07-17 12:48:39 +0000 |
commit | 208ab54e3e9516dd9fcf1ce197950044e0bebd90 (patch) | |
tree | 425580d694235f06661dd2d6763925a1f69279c6 /target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch | |
parent | 03b56c9350057ee77cfe2b8bb8f8d7146917fb79 (diff) | |
download | upstream-208ab54e3e9516dd9fcf1ce197950044e0bebd90.tar.gz upstream-208ab54e3e9516dd9fcf1ce197950044e0bebd90.tar.bz2 upstream-208ab54e3e9516dd9fcf1ce197950044e0bebd90.zip |
brcm2708: add linux 4.1 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 46399
Diffstat (limited to 'target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch b/target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch new file mode 100644 index 0000000000..d939581c14 --- /dev/null +++ b/target/linux/brcm2708/patches-4.1/0095-bcm2708-spi-Don-t-use-static-pin-configuration-with-.patch @@ -0,0 +1,39 @@ +From 2e6c5de15687dadf4c24d880d0cdcb6763aacda5 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Mon, 15 Jun 2015 09:59:38 +0100 +Subject: [PATCH 095/121] bcm2708-spi: Don't use static pin configuration with + DT + +Also remove superfluous error checking - the SPI framework ensures the +validity of the chip_select value. +--- + drivers/spi/spi-bcm2708.c | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +--- a/drivers/spi/spi-bcm2708.c ++++ b/drivers/spi/spi-bcm2708.c +@@ -386,14 +386,6 @@ static int bcm2708_spi_setup(struct spi_ + if (bs->stopping) + return -ESHUTDOWN; + +- if (!(spi->mode & SPI_NO_CS) && +- (spi->chip_select > spi->master->num_chipselect)) { +- dev_dbg(&spi->dev, +- "setup: invalid chipselect %u (%u defined)\n", +- spi->chip_select, spi->master->num_chipselect); +- return -EINVAL; +- } +- + state = spi->controller_state; + if (!state) { + state = kzalloc(sizeof(*state), GFP_KERNEL); +@@ -496,7 +488,8 @@ static int bcm2708_spi_probe(struct plat + return PTR_ERR(clk); + } + +- bcm2708_init_pinmode(); ++ if (!pdev->dev.of_node) ++ bcm2708_init_pinmode(); + + master = spi_alloc_master(&pdev->dev, sizeof(*bs)); + if (!master) { |