diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2015-05-06 07:17:59 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-06-22 09:54:25 -0400 |
commit | 30dd4a8f08b570b5ed978fd937fdb5c31194be41 (patch) | |
tree | 974ec1b460814ab124ec4507bb8a100483b4f87d /drivers/watchdog | |
parent | 21a926a340723035b5c569046056d65f80013e12 (diff) |
watchdog: imx2_wdt: also set wdog->timeout to new_timeout
Commit faad5de0b104 ("watchdog: imx2_wdt: convert to watchdog core api")
removes the custom ioctl function. The generic ioctl handler is not
setting the wdog->timeout to the new_timeout but handing this preset
value back to the userspace. This patch sets the new value in the
drivers set_timeout function to fix that problem.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-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/imx2_wdt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 5e6d808d358a..7cee4024ebfb 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c | |||
@@ -166,6 +166,8 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog, | |||
166 | { | 166 | { |
167 | struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); | 167 | struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); |
168 | 168 | ||
169 | wdog->timeout = new_timeout; | ||
170 | |||
169 | regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT, | 171 | regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT, |
170 | WDOG_SEC_TO_COUNT(new_timeout)); | 172 | WDOG_SEC_TO_COUNT(new_timeout)); |
171 | return 0; | 173 | return 0; |