You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/01 06:57:45 UTC

[GitHub] jacobrosenthal closed pull request #862: drv2605: stats ifdef fix

jacobrosenthal closed pull request #862: drv2605: stats ifdef fix
URL: https://github.com/apache/mynewt-core/pull/862
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/drv2605/include/drv2605/drv2605.h b/hw/drivers/drv2605/include/drv2605/drv2605.h
index ce5e661e2..2fb2a004f 100644
--- a/hw/drivers/drv2605/include/drv2605/drv2605.h
+++ b/hw/drivers/drv2605/include/drv2605/drv2605.h
@@ -80,7 +80,8 @@ drv2605_config(struct drv2605 *drv2605, struct drv2605_cfg *cfg);
 
 
 #if MYNEWT_VAL(DRV2605_CLI)
-int drv2605_shell_init(void);
+int
+drv2605_shell_init(void);
 #endif
 
 
diff --git a/hw/drivers/drv2605/src/drv2605.c b/hw/drivers/drv2605/src/drv2605.c
index a724edc2e..16e0616fd 100644
--- a/hw/drivers/drv2605/src/drv2605.c
+++ b/hw/drivers/drv2605/src/drv2605.c
@@ -129,7 +129,9 @@ drv2605_writelen(struct sensor_itf *itf, uint8_t reg, uint8_t *buffer,
     rc = hal_i2c_master_write(itf->si_num, &data_struct, OS_TICKS_PER_SEC / 10, 1);
     if (rc) {
         DRV2605_ERR("I2C access failed at address 0x%02X\n", data_struct.address);
+#if MYNEWT_VAL(DRV2605_STATS)
         STATS_INC(g_drv2605stats, errors);
+#endif
         goto err;
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services