]> Git Repo - linux.git/commitdiff
i2c-designware: use div_u64 to fix link
authorVincent Stehlé <[email protected]>
Tue, 2 Jul 2013 09:46:54 +0000 (11:46 +0200)
committerWolfram Sang <[email protected]>
Wed, 3 Jul 2013 20:07:51 +0000 (22:07 +0200)
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é <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Reviewed-by: Christian Ruppert <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
drivers/i2c/busses/i2c-designware-platdrv.c

index def79b5fd4c8af986078af105186430a7287ebcf..4c5fadabe49df3236e479c86105d7e479aa90d79 100644 (file)
@@ -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 =
This page took 0.054817 seconds and 4 git commands to generate.