diff options
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c b/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c index c185994bfc..81849d0852 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c | |||
@@ -69,7 +69,7 @@ static const unsigned char pmic_ints_regs[2] = | |||
69 | 69 | ||
70 | #ifdef PMIC_DRIVER_CLOSE | 70 | #ifdef PMIC_DRIVER_CLOSE |
71 | static bool pmic_close = false; | 71 | static bool pmic_close = false; |
72 | static struct thread_entry *mc13783_thread_p = NULL; | 72 | static unsigned int mc13783_thread_id = 0; |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | static void mc13783_interrupt_thread(void) | 75 | static void mc13783_interrupt_thread(void) |
@@ -149,7 +149,7 @@ void mc13783_init(void) | |||
149 | MC13783_GPIO_ISR = (1ul << MC13783_GPIO_LINE); | 149 | MC13783_GPIO_ISR = (1ul << MC13783_GPIO_LINE); |
150 | 150 | ||
151 | #ifdef PMIC_DRIVER_CLOSE | 151 | #ifdef PMIC_DRIVER_CLOSE |
152 | mc13783_thread_p = | 152 | mc13783_thread_id = |
153 | #endif | 153 | #endif |
154 | create_thread(mc13783_interrupt_thread, | 154 | create_thread(mc13783_interrupt_thread, |
155 | mc13783_thread_stack, sizeof(mc13783_thread_stack), 0, | 155 | mc13783_thread_stack, sizeof(mc13783_thread_stack), 0, |
@@ -159,16 +159,16 @@ void mc13783_init(void) | |||
159 | #ifdef PMIC_DRIVER_CLOSE | 159 | #ifdef PMIC_DRIVER_CLOSE |
160 | void mc13783_close(void) | 160 | void mc13783_close(void) |
161 | { | 161 | { |
162 | struct thread_entry *thread = mc13783_thread_p; | 162 | unsigned int thread_id = mc13783_thread_p; |
163 | 163 | ||
164 | if (thread == NULL) | 164 | if (thread_id == 0) |
165 | return; | 165 | return; |
166 | 166 | ||
167 | mc13783_thread_p = NULL; | 167 | mc13783_thread_id = 0; |
168 | 168 | ||
169 | pmic_close = true; | 169 | pmic_close = true; |
170 | wakeup_signal(&mc13783_wake); | 170 | wakeup_signal(&mc13783_wake); |
171 | thread_wait(thread); | 171 | thread_wait(thread_id); |
172 | } | 172 | } |
173 | #endif /* PMIC_DRIVER_CLOSE */ | 173 | #endif /* PMIC_DRIVER_CLOSE */ |
174 | 174 | ||