diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 03cbeb34d141..fb0f46fa1ecd 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -826,9 +826,11 @@ void update_wall_time(void) | |||
826 | */ | 826 | */ |
827 | void getboottime(struct timespec *ts) | 827 | void getboottime(struct timespec *ts) |
828 | { | 828 | { |
829 | struct timespec boottime; | 829 | struct timespec boottime = { |
830 | .tv_sec = wall_to_monotonic.tv_sec + total_sleep_time.tv_sec, | ||
831 | .tv_nsec = wall_to_monotonic.tv_nsec + total_sleep_time.tv_nsec | ||
832 | }; | ||
830 | 833 | ||
831 | boottime = timespec_add_safe(wall_to_monotonic, total_sleep_time); | ||
832 | set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec); | 834 | set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec); |
833 | } | 835 | } |
834 | 836 | ||