diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2017-07-19 10:27:51 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2017-09-09 20:23:00 +0200 |
commit | f6159dd4b085ad839ab02c1ba230535c53ef60d4 (patch) | |
tree | 98c3941f5ae61f4131277595ff355d8f7939d4bf /drivers/watchdog | |
parent | 0bade0215ca4337caa00cd72e88bd71a45396b00 (diff) |
watchdog: renesas_wdt: avoid (theoretical) type overflow
Because the smallest clock divider we can select is 1, 'clks_per_sec'
must be the same type as 'rate'.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/renesas_wdt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c index cf61c92f7ecd..22b0348826de 100644 --- a/drivers/watchdog/renesas_wdt.c +++ b/drivers/watchdog/renesas_wdt.c @@ -37,7 +37,7 @@ struct rwdt_priv { void __iomem *base; struct watchdog_device wdev; struct clk *clk; - unsigned int clks_per_sec; + unsigned long clks_per_sec; u8 cks; }; @@ -112,8 +112,7 @@ static int rwdt_probe(struct platform_device *pdev) { struct rwdt_priv *priv; struct resource *res; - unsigned long rate; - unsigned int clks_per_sec; + unsigned long rate, clks_per_sec; int ret, i; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); |