From: Jan Beulich Date: Mon, 19 Mar 2012 09:30:33 +0000 (+0000) Subject: watchdog: xen: don't unconditionally enable the watchdog during resume X-Git-Tag: v3.4-rc1~67^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83448bf7867917d5fd104e65275d8e153f3293a8;p=profile%2Fcommon%2Fkernel-common.git watchdog: xen: don't unconditionally enable the watchdog during resume This was found to be a problem particularly after guest migration. Signed-off-by: Jan Beulich Reported-by: Wouter de Geus Reported-by: Ian Campbell Tested-by: Wouter de Geus Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c index 79aa7f9..e04fd6c 100644 --- a/drivers/watchdog/xen_wdt.c +++ b/drivers/watchdog/xen_wdt.c @@ -296,11 +296,18 @@ static void xen_wdt_shutdown(struct platform_device *dev) static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state) { - return xen_wdt_stop(); + typeof(wdt.id) id = wdt.id; + int rc = xen_wdt_stop(); + + wdt.id = id; + return rc; } static int xen_wdt_resume(struct platform_device *dev) { + if (!wdt.id) + return 0; + wdt.id = 0; return xen_wdt_start(); }