diff options
author | Richard Leitner <dev@g0hl1n.net> | 2014-12-08 16:28:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-12 05:04:11 -0800 |
commit | 769105aa740dc0428f2585ec99c457d30aaab364 (patch) | |
tree | a161eda1d8d09afc40537a59071a71334d89f744 /drivers/char/mem.c | |
parent | 0ec0cf19201da36af858a6bc052a13e88866f341 (diff) | |
download | linux-769105aa740dc0428f2585ec99c457d30aaab364.tar.gz linux-769105aa740dc0428f2585ec99c457d30aaab364.tar.bz2 linux-769105aa740dc0428f2585ec99c457d30aaab364.zip |
misc: ioc4: simplify wave period measurement in clock_calibrate
The loop for measuring the square wave periods over some cycles is
refactored to be more easily readable. This includes avoiding a
"by-hand-implemented" for loop with a "real" one and adding some
comments.
Furthermore the following compiler warning is avoided by this patch:
drivers/misc/ioc4.c: In function ‘ioc4_probe’:
drivers/misc/ioc4.c:194:16: warning: ‘start’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
period = (end - start) /
^
drivers/misc/ioc4.c:148:11: note: ‘start’ was declared here
uint64_t start, end, period;
^
Signed-off-by: Richard Leitner <dev@g0hl1n.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/mem.c')
0 files changed, 0 insertions, 0 deletions