[PATCH 10/19] libchip/i2c/spi-memdrv.c: Do not use rtems_clock_get()

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 16 20:29:27 UTC 2015


---
 c/src/libchip/i2c/spi-memdrv.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/c/src/libchip/i2c/spi-memdrv.c b/c/src/libchip/i2c/spi-memdrv.c
index eba7b40..5930297 100644
--- a/c/src/libchip/i2c/spi-memdrv.c
+++ b/c/src/libchip/i2c/spi-memdrv.c
@@ -94,14 +94,11 @@ static rtems_status_code spi_memdrv_wait_ms
 |    o = ok or error code                                                   |
 \*=========================================================================*/
 {
-  rtems_status_code          rc = RTEMS_SUCCESSFUL;
-  rtems_interval ticks_per_second;
+  rtems_interval   ticks_per_second;
 
-  rc = rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND,&ticks_per_second);
-  if (rc == RTEMS_SUCCESSFUL) {
-    rc = rtems_task_wake_after(ticks_per_second * ms / 1000);
-  }
-  return rc;
+  ticks_per_second = rtems_clock_get_ticks_per_second();
+  (void) rtems_task_wake_after(ticks_per_second * ms / 1000);
+  return 0;
 }
 
 /*=========================================================================*\
-- 
1.9.3




More information about the devel mailing list