[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170702122426.GA17561@lynnl.wit>
Date: Sun, 2 Jul 2017 20:24:26 +0800
From: Lynn Lei <lynnl.wit@...il.com>
To: sudipm.mukherjee@...il.com
Cc: teddy.wang@...iconmotion.com, gregkh@...uxfoundation.org,
linux-fbdev@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: sm750fb: refactor the clock frequency calculation
method
speed up calculation by merging two divisions into one.
Signed-off-by: Lynn Lei <lynnl.wit@...il.com>
---
drivers/staging/sm750fb/ddk750_chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index c51761221131..5970c3792f27 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -44,7 +44,7 @@ static unsigned int get_mxclk_freq(void)
OD = (pll_reg & PLL_CTRL_OD_MASK) >> PLL_CTRL_OD_SHIFT;
POD = (pll_reg & PLL_CTRL_POD_MASK) >> PLL_CTRL_POD_SHIFT;
- return DEFAULT_INPUT_CLOCK * M / N / (1 << OD) / (1 << POD);
+ return DEFAULT_INPUT_CLOCK * M / N / (1 << (OD + POD));
}
/*
--
2.13.2
Powered by blists - more mailing lists