watchdog: Fix build error in txx9wdt.c
PATCH 1/1 watchdog: Fix build error in txx9wdt.c
we need to get clk_get_rate(txx9_imclk) before using WD_MAX_TIMEOUT.
This patch fixes below build errors:
CC drivers/watchdog/txx9wdt.odrivers/watchdog/txx9wdt.c:104: error: initializer element is not constant drivers/watchdog/txx9wdt.c:104: error: (near initialization for ‘txx9wdt.max_timeout’) make[2]: *** [drivers/watchdog/txx9wdt.o] Error 1
make[1]: *** [drivers/watchdog] Error 2
make: *** [drivers] Error 2
--- drivers/watchdog/txx9wdt.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/txx9wdt.c +2 -2
@@ -100,8 +100,6 @@ static const struct watchdog_ops txx9wdt_ops = {static struct watchdog_device txx9wdt = { .info = &txx9wdt_info, .ops = &txx9wdt_ops, - .min_timeout =1 , - .max_timeout =WD_MAX_TIMEOUT , };static int __init txx9wdt_probe (struct platform_device *dev)
@@ -132,6 +130,8 @@ static int __init txx9wdt_probe(struct platform_device *dev)if (timeout <1 || timeout >WD_MAX_TIMEOUT ) timeout =TIMER_MARGIN ; txx9wdt.timeout = timeout; + txx9wdt.min_timeout =1 ; + txx9wdt.max_timeout =WD_MAX_TIMEOUT ;watchdog_set_nowayout (&txx9wdt, nowayout); ret =watchdog_register_device (&txx9wdt);
Signature · 8 lines
1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Axel Lin
we need to get
clk_get_rate(txx9_imclk)before usingWD_MAX_TIMEOUT.This patch fixes below build errors:
CCdrivers/watchdog/txx9wdt.odrivers/watchdog/txx9wdt.c:104: error: initializer element is not constantdrivers/watchdog/txx9wdt.c:104: error: (near initialization for ‘txx9wdt.max_timeout’) make[2]: *** [drivers/watchdog/txx9wdt.o] Error 1
make[1]: *** [drivers/watchdog] Error 2
make: *** [drivers] Error 2Signed-off-by Axel Lin <[email protected]>
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |