Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324762
b: refs/heads/master
c: 147cd16
h: refs/heads/master
v: v3
  • Loading branch information
Dae S. Kim authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent e2117df commit 8d9d8ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ee34ab2b37a2a8191bb1b33eebd3ed8cfae0ce6
refs/heads/master: 147cd165757fc67fdf8ae58b015f39c8134970fb
17 changes: 7 additions & 10 deletions trunk/drivers/staging/android/alarm-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];

static int is_wakeup(enum android_alarm_type type)
{
if (type == ANDROID_ALARM_RTC_WAKEUP ||
type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP)
return 1;
return 0;
return (type == ANDROID_ALARM_RTC_WAKEUP ||
type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
}


Expand All @@ -85,12 +83,9 @@ static void devalarm_start(struct devalarm *alrm, ktime_t exp)

static int devalarm_try_to_cancel(struct devalarm *alrm)
{
int ret;
if (is_wakeup(alrm->type))
ret = alarm_try_to_cancel(&alrm->u.alrm);
else
ret = hrtimer_try_to_cancel(&alrm->u.hrt);
return ret;
return alarm_try_to_cancel(&alrm->u.alrm);
return hrtimer_try_to_cancel(&alrm->u.hrt);
}

static void devalarm_cancel(struct devalarm *alrm)
Expand Down Expand Up @@ -223,10 +218,12 @@ static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case ANDROID_ALARM_ELAPSED_REALTIME:
get_monotonic_boottime(&tmp_time);
break;
case ANDROID_ALARM_TYPE_COUNT:
case ANDROID_ALARM_SYSTEMTIME:
ktime_get_ts(&tmp_time);
break;
default:
rv = -EINVAL;
goto err1;
}
if (copy_to_user((void __user *)arg, &tmp_time,
sizeof(tmp_time))) {
Expand Down

0 comments on commit 8d9d8ed

Please sign in to comment.