wdat_wdt.c (552c69b36ebd966186573b9c7a286b390935cce1) | wdat_wdt.c (20745634c569b9948678b166f94da3041296ef52) |
---|---|
1/* 2 * ACPI Hardware Watchdog (WDAT) driver. 3 * 4 * Copyright (C) 2016, Intel Corporation 5 * Author: Mika Westerberg <mika.westerberg@linux.intel.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 433 unchanged lines hidden (view full) --- 442 443 watchdog_set_nowayout(&wdat->wdd, nowayout); 444 return devm_watchdog_register_device(&pdev->dev, &wdat->wdd); 445} 446 447#ifdef CONFIG_PM_SLEEP 448static int wdat_wdt_suspend_noirq(struct device *dev) 449{ | 1/* 2 * ACPI Hardware Watchdog (WDAT) driver. 3 * 4 * Copyright (C) 2016, Intel Corporation 5 * Author: Mika Westerberg <mika.westerberg@linux.intel.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 433 unchanged lines hidden (view full) --- 442 443 watchdog_set_nowayout(&wdat->wdd, nowayout); 444 return devm_watchdog_register_device(&pdev->dev, &wdat->wdd); 445} 446 447#ifdef CONFIG_PM_SLEEP 448static int wdat_wdt_suspend_noirq(struct device *dev) 449{ |
450 struct platform_device *pdev = to_platform_device(dev); 451 struct wdat_wdt *wdat = platform_get_drvdata(pdev); | 450 struct wdat_wdt *wdat = dev_get_drvdata(dev); |
452 int ret; 453 454 if (!watchdog_active(&wdat->wdd)) 455 return 0; 456 457 /* 458 * We need to stop the watchdog if firmare is not doing it or if we 459 * are going suspend to idle (where firmware is not involved). If --- 10 unchanged lines hidden (view full) --- 470 ret = wdat_wdt_ping(&wdat->wdd); 471 } 472 473 return ret; 474} 475 476static int wdat_wdt_resume_noirq(struct device *dev) 477{ | 451 int ret; 452 453 if (!watchdog_active(&wdat->wdd)) 454 return 0; 455 456 /* 457 * We need to stop the watchdog if firmare is not doing it or if we 458 * are going suspend to idle (where firmware is not involved). If --- 10 unchanged lines hidden (view full) --- 469 ret = wdat_wdt_ping(&wdat->wdd); 470 } 471 472 return ret; 473} 474 475static int wdat_wdt_resume_noirq(struct device *dev) 476{ |
478 struct platform_device *pdev = to_platform_device(dev); 479 struct wdat_wdt *wdat = platform_get_drvdata(pdev); | 477 struct wdat_wdt *wdat = dev_get_drvdata(dev); |
480 int ret; 481 482 if (!watchdog_active(&wdat->wdd)) 483 return 0; 484 485 if (!wdat->stopped) { 486 /* 487 * Looks like the boot firmware reinitializes the watchdog --- 43 unchanged lines hidden --- | 478 int ret; 479 480 if (!watchdog_active(&wdat->wdd)) 481 return 0; 482 483 if (!wdat->stopped) { 484 /* 485 * Looks like the boot firmware reinitializes the watchdog --- 43 unchanged lines hidden --- |