summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight
diff options
context:
space:
mode:
authorAndy Shevchenko2019-05-15 00:43:08 +0200
committerLinus Torvalds2019-05-15 04:52:49 +0200
commit9f6158946987a5ce3f16da097d18f240a89db417 (patch)
treec232e7df2397d4186b39a1a4de9bb2534a60170f /drivers/video/backlight
parentlib: Move mathematic helpers to separate folder (diff)
downloadkernel-qcow2-linux-9f6158946987a5ce3f16da097d18f240a89db417.tar.gz
kernel-qcow2-linux-9f6158946987a5ce3f16da097d18f240a89db417.tar.xz
kernel-qcow2-linux-9f6158946987a5ce3f16da097d18f240a89db417.zip
lib/math: move int_pow() from pwm_bl.c for wider use
The integer exponentiation is used in few places and might be used in the future by other call sites. Move it to wider use. Link: http://lkml.kernel.org/r/20190323172531.80025-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Ray Jui <rjui@broadcom.com> Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/pwm_bl.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 53b8ceea9bde..fb45f866b923 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -155,21 +155,6 @@ static const struct backlight_ops pwm_backlight_ops = {
#ifdef CONFIG_OF
#define PWM_LUMINANCE_SCALE 10000 /* luminance scale */
-/* An integer based power function */
-static u64 int_pow(u64 base, int exp)
-{
- u64 result = 1;
-
- while (exp) {
- if (exp & 1)
- result *= base;
- exp >>= 1;
- base *= base;
- }
-
- return result;
-}
-
/*
* CIE lightness to PWM conversion.
*