diff options
Diffstat (limited to 'drivers/watchdog/via_wdt.c')
| -rw-r--r-- | drivers/watchdog/via_wdt.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c index 5f9cbc37520d..f55576392651 100644 --- a/drivers/watchdog/via_wdt.c +++ b/drivers/watchdog/via_wdt.c @@ -1,8 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * VIA Chipset Watchdog Driver * * Copyright (C) 2011 Sigfox - * License terms: GNU General Public License (GPL) version 2 * Author: Marc Vertes <marc.vertes@sigfox.com> * Based on a preliminary version from Harald Welte <HaraldWelte@viatech.com> * Timer code by Wim Van Sebroeck <wim@iguana.be> @@ -30,7 +30,7 @@ #define VIA_WDT_CONF_MMIO 0x02 /* 1: enable watchdog MMIO */ /* - * The MMIO region contains the watchog control register and the + * The MMIO region contains the watchdog control register and the * hardware timer counter. */ #define VIA_WDT_MMIO_LEN 8 /* MMIO region length in bytes */ @@ -67,8 +67,8 @@ static struct watchdog_device wdt_dev; static struct resource wdt_res; static void __iomem *wdt_mem; static unsigned int mmio; -static void wdt_timer_tick(unsigned long data); -static DEFINE_TIMER(timer, wdt_timer_tick, 0, 0); +static void wdt_timer_tick(struct timer_list *unused); +static DEFINE_TIMER(timer, wdt_timer_tick); /* The timer that pings the watchdog */ static unsigned long next_heartbeat; /* the next_heartbeat for the timer */ @@ -82,13 +82,13 @@ static inline void wdt_reset(void) /* * Timer tick: the timer will make sure that the watchdog timer hardware * is being reset in time. The conditions to do this are: - * 1) the watchog timer has been started and /dev/watchdog is open + * 1) the watchdog timer has been started and /dev/watchdog is open * and there is still time left before userspace should send the * next heartbeat/ping. (note: the internal heartbeat is much smaller * then the external/userspace heartbeat). * 2) the watchdog timer has been stopped by userspace. */ -static void wdt_timer_tick(unsigned long data) +static void wdt_timer_tick(struct timer_list *unused) { if (time_before(jiffies, next_heartbeat) || (!watchdog_active(&wdt_dev))) { @@ -165,6 +165,7 @@ static int wdt_probe(struct pci_dev *pdev, dev_err(&pdev->dev, "cannot enable PCI device\n"); return -ENODEV; } + wdt_res.name = "via_wdt"; /* * Allocate a MMIO region which contains watchdog control register @@ -233,7 +234,7 @@ err_out_disable_device: static void wdt_remove(struct pci_dev *pdev) { watchdog_unregister_device(&wdt_dev); - del_timer_sync(&timer); + timer_delete_sync(&timer); iounmap(wdt_mem); release_mem_region(mmio, VIA_WDT_MMIO_LEN); release_resource(&wdt_res); |
