c60eb1954af39ea4d70bdecaafb5ad52ba66d49a
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.4 / 820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Subject: [PATCH] spi: bcm53xx: let DT specify SPI device(s) instead hardcoding
3 them
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
9 ---
10
11 --- a/drivers/spi/spi-bcm53xx.c
12 +++ b/drivers/spi/spi-bcm53xx.c
13 @@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct
14 * BCMA
15 **************************************************/
16
17 -static struct spi_board_info bcm53xx_info = {
18 - .modalias = "bcm53xxspiflash",
19 -};
20 -
21 static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = {
22 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS),
23 {},
24 @@ -300,6 +296,7 @@ static int bcm53xxspi_bcma_probe(struct
25 master = spi_alloc_master(dev, sizeof(*b53spi));
26 if (!master)
27 return -ENOMEM;
28 + master->dev.of_node = dev->of_node;
29
30 b53spi = spi_master_get_devdata(master);
31 b53spi->master = master;
32 @@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct
33 return err;
34 }
35
36 - /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
37 - spi_new_device(master, &bcm53xx_info);
38 -
39 return 0;
40 }
41