]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
watchdog: tegra: Fix a linker issue
authorArun Kannan <akannan@nvidia.com>
Wed, 2 Jul 2014 18:25:09 +0000 (11:25 -0700)
committerMitch Luban <mluban@nvidia.com>
Tue, 8 Jul 2014 23:48:16 +0000 (16:48 -0700)
Fix a linker issue with div and modulo operations
which caused linker to throw an undefined reference to
__aeabi_uldivmod using gcc 4.7.
Fix by typecast to int after division.

Change-Id: Iea100e9ae4bc6e53312af66f2abf97b4431346e0
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/433783
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
drivers/watchdog/tegra_wdt.c

index 9fa7e60f525fe4416bc8177ac314fb3664dccf26..3aca3391ec62210d7f09a807a1d37f720693221f 100644 (file)
@@ -255,7 +255,7 @@ static int tegra_wdt_probe(struct platform_device *pdev)
        if ((res_wdt->start & 0xff) < 0x50)
                tegra_wdt->tmrsrc = 1 + (res_wdt->start & 0xf) / 8;
        else
-               tegra_wdt->tmrsrc = (3 + ((res_wdt->start & 0xff) - 0x50) / 8) % 10;
+               tegra_wdt->tmrsrc = ((int) (3 + ((res_wdt->start & 0xff) - 0x50) / 8)) % 10;
        if (!tegra_wdt->wdt_source || !tegra_wdt->wdt_timer) {
                dev_err(&pdev->dev, "unable to map registers\n");
                ret = -ENOMEM;