]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spi: spi-uclass: Block dm_scan_fdt_dev with OF_CONTROL to prevent build failures
authorFaiz Abbas <faiz_abbas@ti.com>
Mon, 14 Sep 2020 06:41:14 +0000 (12:11 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 15 Sep 2020 13:21:53 +0000 (18:51 +0530)
There are devices which don't use OF_CONTROL or OF_PLATDATA but instead
rely on statically defined platdata. Block dm_scan_fdt_dev() with both
configs to avoid build failures under this condition.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/spi-uclass.c

index cffd9cf0b0e7d7c5ebd0d3d684ff88b0bb669595..55a8eed89010b463d0256e9934d87f74da1a8255 100644 (file)
@@ -497,7 +497,7 @@ UCLASS_DRIVER(spi) = {
        .id             = UCLASS_SPI,
        .name           = "spi",
        .flags          = DM_UC_FLAG_SEQ_ALIAS,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
        .post_bind      = dm_scan_fdt_dev,
 #endif
        .post_probe     = spi_post_probe,