diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-22 17:57:37 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-12-23 13:38:38 +0000 |
commit | e6609c26b3ab71aa3ef2f7f9524a066a863a7f18 (patch) | |
tree | 25f1ec534942fcb94ed67278c099d07155504c25 | |
parent | c70282457c380db7deb57c81a6894debc8f88efa (diff) | |
download | lwn-e6609c26b3ab71aa3ef2f7f9524a066a863a7f18.tar.gz lwn-e6609c26b3ab71aa3ef2f7f9524a066a863a7f18.zip |
spi: dln2: Propagate firmware node
Propagate firmware node by using a specific API call, i.e. device_set_node().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211222155739.7699-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-dln2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c index 3ff63ab82f4f..0a1fb2bc9e54 100644 --- a/drivers/spi/spi-dln2.c +++ b/drivers/spi/spi-dln2.c @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/mfd/dln2.h> #include <linux/spi/spi.h> #include <linux/pm_runtime.h> @@ -688,6 +689,8 @@ static int dln2_spi_probe(struct platform_device *pdev) if (!master) return -ENOMEM; + device_set_node(&master->dev, dev_fwnode(dev)); + platform_set_drvdata(pdev, master); dln2 = spi_master_get_devdata(master); @@ -699,7 +702,6 @@ static int dln2_spi_probe(struct platform_device *pdev) } dln2->master = master; - 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 */ |