projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdd3cc2
)
ARM: SAMSUNG: fix race in s3c_adc_start for ADC
author
Todd Poynor
<
[email protected]
>
Fri, 13 Jul 2012 06:30:48 +0000
(15:30 +0900)
committer
Kukjin Kim
<
[email protected]
>
Fri, 13 Jul 2012 06:35:04 +0000
(15:35 +0900)
Checking for adc->ts_pend already claimed should be done with the
lock held.
Signed-off-by: Todd Poynor <
[email protected]
>
Acked-by: Ben Dooks <
[email protected]
>
Cc: Stable <
[email protected]
>
Signed-off-by: Kukjin Kim <
[email protected]
>
arch/arm/plat-samsung/adc.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-samsung/adc.c
b/arch/arm/plat-samsung/adc.c
index 33ecd0c9f0c3ecfdc63aaf44cab40a8deabd5f0c..b1e05ccff3acdb2ff4e5585ea1fb4947ebd18f28 100644
(file)
--- a/
arch/arm/plat-samsung/adc.c
+++ b/
arch/arm/plat-samsung/adc.c
@@
-157,11
+157,13
@@
int s3c_adc_start(struct s3c_adc_client *client,
return -EINVAL;
}
- if (client->is_ts && adc->ts_pend)
- return -EAGAIN;
-
spin_lock_irqsave(&adc->lock, flags);
+ if (client->is_ts && adc->ts_pend) {
+ spin_unlock_irqrestore(&adc->lock, flags);
+ return -EAGAIN;
+ }
+
client->channel = channel;
client->nr_samples = nr_samples;