From: Kevin Hao <[email protected]>

The cdns_xspi_dev::cs_defined is only defined when
CONFIG_SPI_CADENCE_MRVL_XSPI is enabled. So wrap the access to
cdns_xspi_dev::cs_defined in #if to fix the build failure.

Signed-off-by: Kevin Hao <[email protected]>
---
Hi Bruce,

Could you help me merge this patch to the following two branches?
  v5.15/standard/cn-sdkv5.15/octeon
  v5.15/standard/preempt-rt/cn-sdkv5.15/octeon

 drivers/spi/spi-cadence-xspi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-cadence-xspi.c b/drivers/spi/spi-cadence-xspi.c
index 81e71f19411f..e19170cf2448 100644
--- a/drivers/spi/spi-cadence-xspi.c
+++ b/drivers/spi/spi-cadence-xspi.c
@@ -1138,7 +1138,9 @@ static int cdns_xspi_of_get_plat_data(struct 
platform_device *pdev)
                        fwnode_handle_put(fwnode_child);
                        return -ENXIO;
                }
+#if IS_ENABLED(CONFIG_SPI_CADENCE_MRVL_XSPI)
                cdns_xspi->cs_defined |= BIT(cs);
+#endif
        }
 
        return 0;
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13304): 
https://lists.yoctoproject.org/g/linux-yocto/message/13304
Mute This Topic: https://lists.yoctoproject.org/mt/102729826/21656
Mute #if:https://lists.yoctoproject.org/g/linux-yocto/mutehashtag/if
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to