spi: mpc5xxx-psc: Propagate firmware node
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 6 Mar 2023 18:31:14 +0000 (20:31 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2023 13:58:33 +0000 (13:58 +0000)
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/20230306183115.87314-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mpc512x-psc.c
drivers/spi/spi-mpc52xx-psc.c

index 739df2b241e97462c75e18c8a6854351fd3f9da1..77a228f633d1bc0f85a3ce8f6dce9985636689c7 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/completion.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
@@ -478,7 +479,8 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *pdev)
        master->unprepare_transfer_hardware = mpc512x_psc_spi_unprep_xfer_hw;
        master->use_gpio_descriptors = true;
        master->cleanup = mpc512x_psc_spi_cleanup;
-       master->dev.of_node = dev->of_node;
+
+       device_set_node(&master->dev, dev_fwnode(dev));
 
        tempp = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(tempp))
index b75bc2457883bae2436cf2acddefa73e7ae64ea0..335a6b9eb141512f62afa3e0f76884e1816e0d8c 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/workqueue.h>
 #include <linux/completion.h>
 #include <linux/io.h>
@@ -318,7 +318,8 @@ static int mpc52xx_psc_spi_of_probe(struct platform_device *pdev)
        master->setup = mpc52xx_psc_spi_setup;
        master->transfer_one_message = mpc52xx_psc_spi_transfer_one_message;
        master->cleanup = mpc52xx_psc_spi_cleanup;
-       master->dev.of_node = dev->of_node;
+
+       device_set_node(&master->dev, dev_fwnode(dev));
 
        mps->psc = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(mps->psc))