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 <[email protected]>
Reported-by: Wouter de Geus <[email protected]>
Reported-by: Ian Campbell <[email protected]>
Tested-by: Wouter de Geus <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
Jan Beulich 2012-03-19 09:30:33 +00:00 • committed by Wim Van Sebroeck
commit 83448bf786

View file

@ -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();
}