watchdog: imx2_wdt: also set wdog->timeout to new_timeout
Subsystems (2)
PATCH 1/1 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.
--- drivers/watchdog/imx2_wdt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/watchdog/imx2_wdt.c +2 -0
@@ -166,6 +166,8 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog, {struct imx2_wdt_device *wdev =watchdog_get_drvdata (wdog); + wdog->timeout = new_timeout; +regmap_update_bits (wdev->regmap,IMX2_WDT_WCR ,IMX2_WDT_WCR_WT ,WDOG_SEC_TO_COUNT (new_timeout));return 0 ;
Signature · 1 line
2.1.4
Guenter Roeck
maintainerPATCH 1/1 watchdog: imx2_wdt: also set wdog->timeout to new_timeout
Quoted 7 lines · Michael Grzeschik
Commit
faad5de0b104("watchdog:imx2_wdt: convert to watchdog core api") removes the custom ioctl function. The generic ioctl handler is not setting thewdog->timeoutto thenew_timeoutbut handing this preset value back to the userspace. This patch sets the new value in the driversset_timeoutfunction to fix that problem.Signed-off-by Michael Grzeschik <[email protected]>