]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - include/linux/clocksource.h
clocksource: Introduce clocksource_freq2mult()
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 27 Feb 2016 03:14:13 +0000 (19:14 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 27 Feb 2016 07:55:30 +0000 (08:55 +0100)
commit7aca0c07207385cca76025cc85231519935722b9
tree3ef5dafb42ad1f6772df77eb499d660176c75599
parent07f101d33def572c7018626735475f88dabecebf
clocksource: Introduce clocksource_freq2mult()

The clocksource_khz2mult() and clocksource_hz2mult() share similar
code wihch calculates a mult from the given frequency. Both implementations
in differ only in value of a frequency. This patch introduces the
clocksource_freq2mult() helper with generic implementation of
mult calculation to prevent code duplication.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Link: http://lkml.kernel.org/r/1456542854-22104-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/clocksource.h