diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2016-12-29 19:27:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-31 21:36:53 +0300 |
commit | 78d759daceaf0a7058f37c4142bdca9948b6d987 (patch) | |
tree | d573ea5fa76fbe867968e6ed7a4646ba4004406d /drivers/spi/spi-bcm53xx.c | |
parent | fafd67940774733fa97f4b09412aea6981b82e0a (diff) | |
download | linux-78d759daceaf0a7058f37c4142bdca9948b6d987.tar.xz |
spi: bcm53xx: set of_node to let DT specify device(s)
Setting of_node of master's dev seems to be a common way of letting it
work nicely with DT. This allows specifying device there instead of
hardcoding one in the driver code.
This was successfully tested with commit 1b47b98acce2 ("ARM: BCM5301X:
Add DT entry for SPI controller and NOR flash")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bcm53xx.c')
-rw-r--r-- | drivers/spi/spi-bcm53xx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/spi/spi-bcm53xx.c b/drivers/spi/spi-bcm53xx.c index afb51699dbb5..0c61ad4edb1a 100644 --- a/drivers/spi/spi-bcm53xx.c +++ b/drivers/spi/spi-bcm53xx.c @@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct spi_device *spi, * BCMA **************************************************/ -static struct spi_board_info bcm53xx_info = { - .modalias = "bcm53xxspiflash", -}; - static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = { BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS), {}, @@ -311,6 +307,7 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) b53spi->bspi = true; bcm53xxspi_disable_bspi(b53spi); + master->dev.of_node = dev->of_node; master->transfer_one = bcm53xxspi_transfer_one; if (b53spi->mmio_base) master->spi_flash_read = bcm53xxspi_flash_read; @@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) return err; } - /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */ - spi_new_device(master, &bcm53xx_info); - return 0; } |