diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-09-30 12:40:40 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-09-30 12:40:40 -0400 |
commit | eeea8b40cd2866ca24f25e5ef09225edb076ae45 (patch) | |
tree | ece5b5287ee2ce53a841b66d0f526947f74d036f /kernel/time/timekeeping_debug.c | |
parent | 3383c5c395386ac8e258b1a324c72ce850b84a9e (diff) | |
parent | 513e43efafe329dad7b5794583b67ac898dcbdca (diff) |
Merge tag 'asoc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.9
Apart from the cleanups done by Morimoto-san this has very much been a
driver focused release with very little generic change:
- A big factoring out of the simple-card code to allow it to be shared
more with the rcar generic card from Kuninori Morimoto.
- Removal of some operations duplicated on the CODEC level, again by
Kuninori Morimoto.
- Lots more machine support for x86 systems.
- New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663.
Diffstat (limited to 'kernel/time/timekeeping_debug.c')
-rw-r--r-- | kernel/time/timekeeping_debug.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index f6bd65236712..107310a6f36f 100644 --- a/kernel/time/timekeeping_debug.c +++ b/kernel/time/timekeeping_debug.c | |||
@@ -23,7 +23,9 @@ | |||
23 | 23 | ||
24 | #include "timekeeping_internal.h" | 24 | #include "timekeeping_internal.h" |
25 | 25 | ||
26 | static unsigned int sleep_time_bin[32] = {0}; | 26 | #define NUM_BINS 32 |
27 | |||
28 | static unsigned int sleep_time_bin[NUM_BINS] = {0}; | ||
27 | 29 | ||
28 | static int tk_debug_show_sleep_time(struct seq_file *s, void *data) | 30 | static int tk_debug_show_sleep_time(struct seq_file *s, void *data) |
29 | { | 31 | { |
@@ -69,6 +71,9 @@ late_initcall(tk_debug_sleep_time_init); | |||
69 | 71 | ||
70 | void tk_debug_account_sleep_time(struct timespec64 *t) | 72 | void tk_debug_account_sleep_time(struct timespec64 *t) |
71 | { | 73 | { |
72 | sleep_time_bin[fls(t->tv_sec)]++; | 74 | /* Cap bin index so we don't overflow the array */ |
75 | int bin = min(fls(t->tv_sec), NUM_BINS-1); | ||
76 | |||
77 | sleep_time_bin[bin]++; | ||
73 | } | 78 | } |
74 | 79 | ||