From 15a4403f244f70234dce8f6a89ea94796dee3022 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Tue, 28 Jun 2016 15:48:15 +0900
Subject: chopstx_poll change

---
 contrib/adc-mkl27z.c    | 7 ++++---
 contrib/adc-stm32f103.c | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'contrib')

diff --git a/contrib/adc-mkl27z.c b/contrib/adc-mkl27z.c
index 19f9f5b..d5b679e 100644
--- a/contrib/adc-mkl27z.c
+++ b/contrib/adc-mkl27z.c
@@ -295,12 +295,13 @@ adc_stop (void)
 int
 adc_wait_completion (void)
 {
+  struct chx_poll_head *pd_array[1] = { (struct chx_poll_head *)&adc_intr };
+  int i;
+
   while (1)
     {
-      int i;
-
       /* Wait DMA completion */
-      chopstx_poll (NULL, 1, &adc_intr);
+      chopstx_poll (NULL, 1, pd_array);
 
       DMA0->DSR_BCR = (1 << 24);
       DMA1->DSR_BCR = (1 << 24);
diff --git a/contrib/adc-stm32f103.c b/contrib/adc-stm32f103.c
index 6a8076e..a44942f 100644
--- a/contrib/adc-stm32f103.c
+++ b/contrib/adc-stm32f103.c
@@ -298,10 +298,11 @@ int
 adc_wait_completion (void)
 {
   uint32_t flags;
+  struct chx_poll_head *pd_array[1] = { (struct chx_poll_head *)&adc_intr };
 
   while (1)
     {
-      chopstx_poll (NULL, 1, &adc_intr);
+      chopstx_poll (NULL, 1, pd_array);
       flags = DMA1->ISR & STM32_DMA_ISR_MASK; /* Channel 1 interrupt cause.  */
       /*
        * Clear interrupt cause of channel 1.
-- 
cgit v1.2.3