From: Russell King Date: Fri, 1 Jul 2005 11:02:59 +0000 (+0100) Subject: [PATCH] MMC: Fix divdi3 reference in mmci.c X-Git-Tag: v2.6.13-rc2~29^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b09cdac5af1e13ab4b30421ae5c4b7953c26841;p=linux-2.6 [PATCH] MMC: Fix divdi3 reference in mmci.c Use do_div() instead. Signed-off-by: Russell King --- diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 3a5f6ac5b3..7a42966d75 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,7 @@ static void mmci_stop_data(struct mmci_host *host) static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) { unsigned int datactrl, timeout, irqmask; + unsigned long long clks; void __iomem *base; DBG(host, "blksz %04x blks %04x flags %08x\n", @@ -81,9 +83,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) mmci_init_sg(host, data); - timeout = data->timeout_clks + - ((unsigned long long)data->timeout_ns * host->cclk) / - 1000000000ULL; + clks = (unsigned long long)data->timeout_ns * host->cclk; + do_div(clks, 1000000000UL); + + timeout = data->timeout_clks + (unsigned int)clks; base = host->base; writel(timeout, base + MMCIDATATIMER);