summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorVincent Stehlé <vincent.stehle@freescale.com>2013-07-02 13:46:54 +0400
committerWolfram Sang <wsa@the-dreams.de>2013-07-04 00:07:51 +0400
commit97191d734f6ac028e5e6dcd574378c1544a16c0b (patch)
tree0055eb14024906705addbf992efc4f54134e38ca /drivers/i2c
parente0b9b7b06704eab2b95372a7c8daf9c0cce46bd0 (diff)
downloadlinux-97191d734f6ac028e5e6dcd574378c1544a16c0b.tar.xz
i2c-designware: use div_u64 to fix link
This fixes the following link error: drivers/built-in.o: In function `dw_i2c_probe': of_iommu.c:(.text+0x18c8f0): undefined reference to `__aeabi_uldivmod' make: *** [vmlinux] Error 1 Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com> Tested-by: Kevin Hilman <khilman@linaro.org> Reviewed-by: Christian Ruppert <christian.ruppert@abilis.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index def79b5fd4c8..4c5fadabe49d 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -122,7 +122,8 @@ static int dw_i2c_probe(struct platform_device *pdev)
of_property_read_u32(pdev->dev.of_node,
"i2c-sda-hold-time-ns", &ht);
- dev->sda_hold_time = ((u64)ic_clk * ht + 500000) / 1000000;
+ dev->sda_hold_time = div_u64((u64)ic_clk * ht + 500000,
+ 1000000);
}
dev->functionality =