linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Vincent Stehlé" <vincent.stehle@freescale.com>
To: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org
Cc: "Vincent Stehlé" <vincent.stehle@freescale.com>,
	"Wolfram Sang" <wsa@the-dreams.de>,
	"Christian Ruppert" <christian.ruppert@abilis.com>,
	"Pierrick Hascoet" <pierrick.hascoet@abilis.com>
Subject: [PATCH linux-next] i2c-designware: use div_u64 to fix link
Date: Tue, 2 Jul 2013 11:46:54 +0200	[thread overview]
Message-ID: <1372758414-21513-1-git-send-email-vincent.stehle@freescale.com> (raw)

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>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
---


Hi,

Linux next-20130702 link broke for ARM config multi_v7_defconfig. This is with
gcc 4.7.2 but I am not sure it matters much here.

This patch repairs the link.

It did not break anything for me on i.MX6 sabre sd, but it does'nt have a
designware i2c, so more reviewing/testing is welcome.

Best regards,

V.


 drivers/i2c/busses/i2c-designware-platdrv.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index def79b5..4c5fada 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 =
-- 
1.7.10.4

             reply	other threads:[~2013-07-02  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02  9:46 Vincent Stehlé [this message]
     [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-07-02 21:12   ` [PATCH linux-next] i2c-designware: use div_u64 to fix link Kevin Hilman
2013-07-03 20:09   ` Wolfram Sang
2013-07-03  8:44 ` Christian Ruppert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372758414-21513-1-git-send-email-vincent.stehle@freescale.com \
    --to=vincent.stehle@freescale.com \
    --cc=christian.ruppert@abilis.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=pierrick.hascoet@abilis.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).