This is an automated email from the ASF dual-hosted git repository.

simbit18 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e27767b0c6 drivers/sensors: fix misplaced endif in bmi160_base.c
2e27767b0c6 is described below

commit 2e27767b0c68cca8f9d222420092fb01875f2720
Author: likun17 <[email protected]>
AuthorDate: Wed Apr 15 15:18:52 2026 +0800

    drivers/sensors: fix misplaced endif in bmi160_base.c
    
    Move the #endif preprocessor guard to after bmi160_transferspi()
    so that both bmi160_configspi() and bmi160_transferspi() are
    properly enclosed within the SPI conditional compilation block.
    
    Signed-off-by: likun17 <[email protected]>
---
 drivers/sensors/bmi160_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sensors/bmi160_base.c b/drivers/sensors/bmi160_base.c
index a25aa98c650..3c428bd1be2 100644
--- a/drivers/sensors/bmi160_base.c
+++ b/drivers/sensors/bmi160_base.c
@@ -49,7 +49,6 @@ static void bmi160_configspi(FAR struct spi_dev_s *spi)
   SPI_HWFEATURES(spi, 0);
   SPI_SETFREQUENCY(spi, BMI160_SPI_MAXFREQUENCY);
 }
-#endif
 
 /****************************************************************************
  * Name: bmi160_transferspi
@@ -122,6 +121,7 @@ static void bmi160_transferspi(FAR struct spi_dev_s *spi, 
bool write,
 
   SPI_LOCK(spi, false);
 }
+#endif
 
 /****************************************************************************
  * Private Data

Reply via email to