diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-13 16:20:42 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-13 16:20:42 +0300 |
commit | 55472bae5331f33582d9f0e8919fed8bebcda0da (patch) | |
tree | 4e9d910e8f5de08d1ceb45509ff42641fcd0a6e7 /drivers/watchdog/stpmic1_wdt.c | |
parent | d7a02fa0a8f9ec1b81d57628ca9834563208ef33 (diff) | |
parent | a9f0bda567e32a2b44165b067adfc4a4f56d1815 (diff) | |
download | linux-55472bae5331f33582d9f0e8919fed8bebcda0da.tar.xz |
Merge tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
- a new watchdog driver for the ROHM BD70528 watchdog block
- a new watchdog driver for the i.MX system controller watchdog
- conversions to use device managed functions and other improvements
- refactor watchdog_init_timeout
- make watchdog core configurable as module
- pretimeout governors improvements
- a lot of other fixes
* tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog: (114 commits)
watchdog: Enforce that at least one pretimeout governor is enabled
watchdog: stm32: add dynamic prescaler support
watchdog: Improve Kconfig entry ordering and dependencies
watchdog: npcm: Enable modular builds
watchdog: Make watchdog core configurable as module
watchdog: Move pretimeout governor configuration up
watchdog: Use depends instead of select for pretimeout governors
watchdog: rtd119x: drop unused module.h include
watchdog: intel_scu: make it explicitly non-modular
watchdog: coh901327: make it explicitly non-modular
watchdog: ziirave_wdt: drop warning after calling watchdog_init_timeout
watchdog: xen_wdt: drop warning after calling watchdog_init_timeout
watchdog: stm32_iwdg: drop warning after calling watchdog_init_timeout
watchdog: st_lpc_wdt: drop warning after calling watchdog_init_timeout
watchdog: sp5100_tco: drop warning after calling watchdog_init_timeout
watchdog: renesas_wdt: drop warning after calling watchdog_init_timeout
watchdog: nic7018_wdt: drop warning after calling watchdog_init_timeout
watchdog: ni903x_wdt: drop warning after calling watchdog_init_timeout
watchdog: imx_sc_wdt: drop warning after calling watchdog_init_timeout
watchdog: i6300esb: drop warning after calling watchdog_init_timeout
...
Diffstat (limited to 'drivers/watchdog/stpmic1_wdt.c')
-rw-r--r-- | drivers/watchdog/stpmic1_wdt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c index ad431d8ad95f..45d0c543466f 100644 --- a/drivers/watchdog/stpmic1_wdt.c +++ b/drivers/watchdog/stpmic1_wdt.c @@ -81,18 +81,19 @@ static const struct watchdog_ops pmic_watchdog_ops = { static int pmic_wdt_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; int ret; struct stpmic1 *pmic; struct stpmic1_wdt *wdt; - if (!pdev->dev.parent) + if (!dev->parent) return -EINVAL; - pmic = dev_get_drvdata(pdev->dev.parent); + pmic = dev_get_drvdata(dev->parent); if (!pmic) return -EINVAL; - wdt = devm_kzalloc(&pdev->dev, sizeof(struct stpmic1_wdt), GFP_KERNEL); + wdt = devm_kzalloc(dev, sizeof(struct stpmic1_wdt), GFP_KERNEL); if (!wdt) return -ENOMEM; @@ -102,15 +103,15 @@ static int pmic_wdt_probe(struct platform_device *pdev) wdt->wdtdev.ops = &pmic_watchdog_ops; wdt->wdtdev.min_timeout = PMIC_WDT_MIN_TIMEOUT; wdt->wdtdev.max_timeout = PMIC_WDT_MAX_TIMEOUT; - wdt->wdtdev.parent = &pdev->dev; + wdt->wdtdev.parent = dev; wdt->wdtdev.timeout = PMIC_WDT_DEFAULT_TIMEOUT; - watchdog_init_timeout(&wdt->wdtdev, 0, &pdev->dev); + watchdog_init_timeout(&wdt->wdtdev, 0, dev); watchdog_set_nowayout(&wdt->wdtdev, nowayout); watchdog_set_drvdata(&wdt->wdtdev, wdt); - ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdtdev); + ret = devm_watchdog_register_device(dev, &wdt->wdtdev); if (ret) return ret; |