linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: imx2_wdt: also set wdog->timeout to new_timeout
@ 2015-05-06 11:17 Michael Grzeschik
  2015-05-06 13:40 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2015-05-06 11:17 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/watchdog/imx2_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 5e6d808..7cee402 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,
 {
 	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;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] watchdog: imx2_wdt: also set wdog->timeout to new_timeout
  2015-05-06 11:17 [PATCH] watchdog: imx2_wdt: also set wdog->timeout to new_timeout Michael Grzeschik
@ 2015-05-06 13:40 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2015-05-06 13:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/06/2015 04:17 AM, Michael Grzeschik wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-06 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-06 11:17 [PATCH] watchdog: imx2_wdt: also set wdog->timeout to new_timeout Michael Grzeschik
2015-05-06 13:40 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).