mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
parent
2456e85535
commit
8b0e195314
56 changed files with 84 additions and 95 deletions
|
@ -234,7 +234,7 @@ static int alarmtimer_suspend(struct device *dev)
|
|||
min = freezer_delta;
|
||||
expires = freezer_expires;
|
||||
type = freezer_alarmtype;
|
||||
freezer_delta = ktime_set(0, 0);
|
||||
freezer_delta = 0;
|
||||
spin_unlock_irqrestore(&freezer_delta_lock, flags);
|
||||
|
||||
rtc = alarmtimer_get_rtcdev();
|
||||
|
@ -277,7 +277,7 @@ static int alarmtimer_suspend(struct device *dev)
|
|||
now = ktime_add(now, min);
|
||||
|
||||
/* Set alarm, if in the past reject suspend briefly to handle */
|
||||
ret = rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0));
|
||||
ret = rtc_timer_start(rtc, &rtctimer, now, 0);
|
||||
if (ret < 0)
|
||||
__pm_wakeup_event(ws, MSEC_PER_SEC);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue