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>
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;