diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-s3c24xx/adc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index bc6f6a14dd12..91adfa71c172 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c | |||
@@ -190,6 +190,23 @@ EXPORT_SYMBOL_GPL(s3c_adc_register); | |||
190 | void s3c_adc_release(struct s3c_adc_client *client) | 190 | void s3c_adc_release(struct s3c_adc_client *client) |
191 | { | 191 | { |
192 | /* We should really check that nothing is in progress. */ | 192 | /* We should really check that nothing is in progress. */ |
193 | if (adc_dev->cur == client) | ||
194 | adc_dev->cur = NULL; | ||
195 | if (adc_dev->ts_pend == client) | ||
196 | adc_dev->ts_pend = NULL; | ||
197 | else { | ||
198 | struct list_head *p, *n; | ||
199 | struct s3c_adc_client *tmp; | ||
200 | |||
201 | list_for_each_safe(p, n, &adc_pending) { | ||
202 | tmp = list_entry(p, struct s3c_adc_client, pend); | ||
203 | if (tmp == client) | ||
204 | list_del(&tmp->pend); | ||
205 | } | ||
206 | } | ||
207 | |||
208 | if (adc_dev->cur == NULL) | ||
209 | s3c_adc_try(adc_dev); | ||
193 | kfree(client); | 210 | kfree(client); |
194 | } | 211 | } |
195 | EXPORT_SYMBOL_GPL(s3c_adc_release); | 212 | EXPORT_SYMBOL_GPL(s3c_adc_release); |