summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dln2.c
diff options
context:
space:
mode:
authorCrestez Dan Leonard <leonard.crestez@intel.com>2016-04-15 15:10:52 +0300
committerMark Brown <broonie@kernel.org>2016-04-15 18:02:58 +0100
commit83835fb07836eac1b35e98b919bf757ff7f77aad (patch)
tree878be922588ffac1e4de3ba44bbf63d787b01caf /drivers/spi/spi-dln2.c
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadlinux-83835fb07836eac1b35e98b919bf757ff7f77aad.tar.bz2
spi: dln2: Pass of_node to spi master
This allows defining SPI devices connected to a DLN2 using devicetree. This already works for i2c because of a similar patch: 3b10db23: i2c: dln2: set the device tree node of the adapter Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Acked-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dln2.c')
-rw-r--r--drivers/spi/spi-dln2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
index 3b7d91d94fea..4e8a8629d514 100644
--- a/drivers/spi/spi-dln2.c
+++ b/drivers/spi/spi-dln2.c
@@ -683,6 +683,7 @@ static int dln2_spi_probe(struct platform_device *pdev)
struct spi_master *master;
struct dln2_spi *dln2;
struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ struct device *dev = &pdev->dev;
int ret;
master = spi_alloc_master(&pdev->dev, sizeof(*dln2));
@@ -700,6 +701,8 @@ static int dln2_spi_probe(struct platform_device *pdev)
}
dln2->master = master;
+ dln2->master->dev.parent = dev;
+ dln2->master->dev.of_node = dev->of_node;
dln2->pdev = pdev;
dln2->port = pdata->port;
/* cs/mode can never be 0xff, so the first transfer will set them */