From: Richard Leitner Date: Mon, 8 Dec 2014 15:28:10 +0000 (+0100) Subject: misc: ioc4: simplify wave period measurement in clock_calibrate X-Git-Tag: fixes-v4.0-rc1~101^2~78 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769105aa740dc0428f2585ec99c457d30aaab364;p=pandora-kernel.git 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 Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed