/* Returns: 0 when the timer was not active 1 when the timer was active -1 when the timer is currently excuting the callback function and cannot be stopped  */
int hrtimer_try_to_cancel(struct hrtimer *timer)
/* Returns: 0 when the timer was not active 1 when the timer was active -1 when the timer is currently excuting the callback function and cannot be stopped  */
int hrtimer_try_to_cancel(struct hrtimer *timer)
{
	struct hrtimer_clock_base *base;
	unsigned long flags;
	int ret = -1;
	base = lock_hrtimer_base(timer, &flags);
	if (!hrtimer_callback_running(timer))
		ret = remove_hrtimer(timer, base);
	unlock_hrtimer_base(timer, &flags);
	return ret;
}