summaryrefslogtreecommitdiff
path: root/arch/arm/common
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-02-22 07:26:05 (GMT)
committerIngo Molnar <mingo@kernel.org>2016-02-22 07:26:05 (GMT)
commitab876728a91d89e93e4928895529cd5bb4dff6e4 (patch)
tree3aa7603c289f79a570cf15e4019b1acb9459e608 /arch/arm/common
parent35575e0e8ba633fc8276509a21f89b599b4f9006 (diff)
parent81f70ba233d5f660e1ea5fe23260ee323af5d53a (diff)
downloadlinux-ab876728a91d89e93e4928895529cd5bb4dff6e4.tar.xz
Merge tag 'v4.5-rc5' into efi/core, before queueing up new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/icst.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/common/icst.c b/arch/arm/common/icst.c
index 2dc6da70..d7ed252 100644
--- a/arch/arm/common/icst.c
+++ b/arch/arm/common/icst.c
@@ -16,7 +16,7 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
-
+#include <asm/div64.h>
#include <asm/hardware/icst.h>
/*
@@ -29,7 +29,11 @@ EXPORT_SYMBOL(icst525_s2div);
unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco)
{
- return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * p->s2div[vco.s]);
+ u64 dividend = p->ref * 2 * (u64)(vco.v + 8);
+ u32 divisor = (vco.r + 2) * p->s2div[vco.s];
+
+ do_div(dividend, divisor);
+ return (unsigned long)dividend;
}
EXPORT_SYMBOL(icst_hz);
@@ -58,6 +62,7 @@ icst_hz_to_vco(const struct icst_params *p, unsigned long freq)
if (f > p->vco_min && f <= p->vco_max)
break;
+ i++;
} while (i < 8);
if (i >= 8)