]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: cadence-xspi: Replace OF/ACPI specifics by agnostic APIs
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 29 Nov 2025 15:07:04 +0000 (16:07 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 14 Dec 2025 10:39:20 +0000 (19:39 +0900)
Replace OF/ACPI specific call to get matched driver data with
the agnostic one. This doesn't change functionality. While at
it, add missing property.h include, and drop now unneeded of.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251129150704.3998301-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-xspi.c

index a63a3aa608c63d382658d5b7fa24c3152196896c..c4ab6b2fb43f72e141dab88096a9e706cea7cdf3 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
+#include <linux/property.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi-mem.h>
 #include <linux/bitfield.h>
@@ -1143,12 +1143,9 @@ static int cdns_xspi_probe(struct platform_device *pdev)
                SPI_MODE_0  | SPI_MODE_3;
 
        cdns_xspi = spi_controller_get_devdata(host);
-       cdns_xspi->driver_data = of_device_get_match_data(dev);
-       if (!cdns_xspi->driver_data) {
-               cdns_xspi->driver_data = acpi_device_get_match_data(dev);
-               if (!cdns_xspi->driver_data)
-                       return -ENODEV;
-       }
+       cdns_xspi->driver_data = device_get_match_data(dev);
+       if (!cdns_xspi->driver_data)
+               return -ENODEV;
 
        if (cdns_xspi->driver_data->mrvl_hw_overlay) {
                host->mem_ops = &marvell_xspi_mem_ops;