提交 97191d73 编写于 作者: V Vincent Stehlé 提交者: Wolfram Sang

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: NVincent Stehlé <vincent.stehle@freescale.com>
Tested-by: NKevin Hilman <khilman@linaro.org>
Reviewed-by: NChristian Ruppert <christian.ruppert@abilis.com>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 e0b9b7b0
......@@ -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 =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册