OSDN Git Service
(root)
/
android-x86
/
hardware-intel-libsensors.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cce276f
)
Only signal an acquisition thread if the target sensor is enabled
author
Patrick Porlan
<patrick.porlan@intel.com>
Wed, 17 Dec 2014 14:49:03 +0000
(15:49 +0100)
committer
Gerrit Code Review
<gerrit2@irsgerrit001.ir.intel.com>
Thu, 18 Dec 2014 08:35:37 +0000
(08:35 +0000)
Otherwise the variable is invalid.
Change-Id: I54c6411b29fd3d10f454e17e46ea6d8dbcc228c6
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
control.c
patch
|
blob
|
history
diff --git
a/control.c
b/control.c
index
14f5570
..
917c32d
100644
(file)
--- a/
control.c
+++ b/
control.c
@@
-767,8
+767,9
@@
static int setup_delay_sysfs (int s, float requested_rate)
/* If we're dealing with a poll-mode sensor */
if (!sensor[s].num_channels) {
- /* Wake up thread so the new sampling rate gets used */
- pthread_cond_signal(&thread_release_cond[s]);
+ if (is_enabled(s))
+ /* Wake up thread so the new sampling rate gets used */
+ pthread_cond_signal(&thread_release_cond[s]);
return 0;
}