]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fpga: lattice-sysconfig-spi: Drop of_match_ptr() protection
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 8 May 2026 08:25:36 +0000 (10:25 +0200)
committerXu Yilun <yilun.xu@linux.intel.com>
Mon, 11 May 2026 15:28:09 +0000 (23:28 +0800)
Limiting the scope of devicetree support to CONFIG_OF prevents use of this
driver with ACPI via PRP0001. Drop the dependency.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260508082716.1156192-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
drivers/fpga/lattice-sysconfig-spi.c

index 9f9f76af49fbad78f018ba2147b66c779cbe03dd..351e74c9dfe8cb4c0203b5fd77db68fd9a5d1792 100644 (file)
@@ -130,7 +130,6 @@ static const struct spi_device_id sysconfig_spi_ids[] = {
 };
 MODULE_DEVICE_TABLE(spi, sysconfig_spi_ids);
 
-#if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id sysconfig_of_ids[] = {
        {
                .compatible = "lattice,sysconfig-ecp5",
@@ -139,14 +138,13 @@ static const struct of_device_id sysconfig_of_ids[] = {
        {}
 };
 MODULE_DEVICE_TABLE(of, sysconfig_of_ids);
-#endif /* IS_ENABLED(CONFIG_OF) */
 
 static struct spi_driver lattice_sysconfig_driver = {
        .probe = sysconfig_spi_probe,
        .id_table = sysconfig_spi_ids,
        .driver = {
                .name = "lattice_sysconfig_spi_fpga_mgr",
-               .of_match_table = of_match_ptr(sysconfig_of_ids),
+               .of_match_table = sysconfig_of_ids,
        },
 };
 module_spi_driver(lattice_sysconfig_driver);