summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/dw_wdt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-09 00:04:04 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-09 00:04:04 +0200
commite6cc0b56e2be8746824915d3f7130899b98a1242 (patch)
treee8a42632b55e1f80c6f8f7fef5ca85a4a4f73bf1 /drivers/watchdog/dw_wdt.c
parentMerge tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ra... (diff)
parentwatchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada... (diff)
downloadlinux-e6cc0b56e2be8746824915d3f7130899b98a1242.tar.xz
linux-e6cc0b56e2be8746824915d3f7130899b98a1242.zip
Merge tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - add RTL9310 support - sp805_wdt: add arm cmsdk apb wdt support - Remove #ifdef guards for PM related functions for several watchdog device drivers - pm8916_wdt reboot improvements - Several other fixes and improvements * tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits) watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe() watchdog: dw_wdt: Fix comment typo watchdog: Fix comment typo dt-bindings: watchdog: Add fsl,scu-wdt yaml file watchdog:Fix typo in comment watchdog: pm8916_wdt: Handle watchdog enabled by bootloader watchdog: pm8916_wdt: Report reboot reason watchdog: pm8916_wdt: Avoid read of write-only PET register watchdog: wdat_wdt: Remove #ifdef guards for PM related functions watchdog: tegra_wdt: Remove #ifdef guards for PM related functions watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions watchdog: mtk_wdt: Remove #ifdef guards for PM related functions watchdog: dw_wdt: Remove #ifdef guards for PM related functions watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions watchdog: realtek-otto: add RTL9310 support dt-bindings: watchdog: realtek,otto-wdt: add RTL9310 watchdog: sp805_wdt: add arm cmsdk apb wdt support watchdog: sp5100_tco: Fix a memory leak of EFCH MMIO resource ...
Diffstat (limited to 'drivers/watchdog/dw_wdt.c')
-rw-r--r--drivers/watchdog/dw_wdt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index cd578843277e..52962e8d11a6 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -218,7 +218,7 @@ static int dw_wdt_set_timeout(struct watchdog_device *wdd, unsigned int top_s)
/*
* Set the new value in the watchdog. Some versions of dw_wdt
- * have have TOPINIT in the TIMEOUT_RANGE register (as per
+ * have TOPINIT in the TIMEOUT_RANGE register (as per
* CP_WDT_DUAL_TOP in WDT_COMP_PARAMS_1). On those we
* effectively get a pat of the watchdog right here.
*/
@@ -375,7 +375,6 @@ static irqreturn_t dw_wdt_irq(int irq, void *devid)
return IRQ_HANDLED;
}
-#ifdef CONFIG_PM_SLEEP
static int dw_wdt_suspend(struct device *dev)
{
struct dw_wdt *dw_wdt = dev_get_drvdata(dev);
@@ -410,9 +409,8 @@ static int dw_wdt_resume(struct device *dev)
return 0;
}
-#endif /* CONFIG_PM_SLEEP */
-static SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume);
/*
* In case if DW WDT IP core is synthesized with fixed TOP feature disabled the
@@ -710,7 +708,7 @@ static struct platform_driver dw_wdt_driver = {
.driver = {
.name = "dw_wdt",
.of_match_table = of_match_ptr(dw_wdt_of_match),
- .pm = &dw_wdt_pm_ops,
+ .pm = pm_sleep_ptr(&dw_wdt_pm_ops),
},
};