1 From 83a08affef9c792cbb0e986909e734ef9932a12e Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 15 Jun 2015 09:59:38 +0100
4 Subject: [PATCH 095/148] bcm2708-spi: Don't use static pin configuration with
7 Also remove superfluous error checking - the SPI framework ensures the
8 validity of the chip_select value.
10 drivers/spi/spi-bcm2708.c | 11 ++---------
11 1 file changed, 2 insertions(+), 9 deletions(-)
13 --- a/drivers/spi/spi-bcm2708.c
14 +++ b/drivers/spi/spi-bcm2708.c
15 @@ -386,14 +386,6 @@ static int bcm2708_spi_setup(struct spi_
19 - if (!(spi->mode & SPI_NO_CS) &&
20 - (spi->chip_select > spi->master->num_chipselect)) {
22 - "setup: invalid chipselect %u (%u defined)\n",
23 - spi->chip_select, spi->master->num_chipselect);
27 state = spi->controller_state;
29 state = kzalloc(sizeof(*state), GFP_KERNEL);
30 @@ -496,7 +488,8 @@ static int bcm2708_spi_probe(struct plat
34 - bcm2708_init_pinmode();
35 + if (!pdev->dev.of_node)
36 + bcm2708_init_pinmode();
38 master = spi_alloc_master(&pdev->dev, sizeof(*bs));