summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-09-10 14:57:16 -0500
committerSantosh Shukla <sshukla@mvista.com>2015-04-15 09:38:39 +0000
commit902e4d4eb0d2158d2792166221a72a829caecf07 (patch)
tree1728668962eccee691739d83cc6e6fc85abd3727
parentd6c894e515b4cd93c3a08e7c60cce0aa5118c656 (diff)
hrtimer.h: prevent pinned timer state from breaking inactive test
An hrtimer may be pinned to a CPU but inactive, so it is no longer valid to test the hrtimer.state struct member as having no bits set when inactive. Changed the test function to mask out the HRTIMER_STATE_PINNED bit when checking for inactive state. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
-rw-r--r--include/linux/hrtimer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index e0c09ffce2f..c39f9f37183 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -398,7 +398,7 @@ extern ktime_t hrtimer_get_next_event(void);
*/
static inline int hrtimer_active(const struct hrtimer *timer)
{
- return timer->state != HRTIMER_STATE_INACTIVE;
+ return (timer->state & (~HRTIMER_STATE_PINNED)) != HRTIMER_STATE_INACTIVE;
}
/*