Commit Graph

4 Commits

Author SHA1 Message Date
Rikard Falkeborn 625e407ce0 watchdog: tqmx86: Constify static struct watchdog_ops
The struct tqmx86_wdt_ops is only assigned to the ops pointer in the
watchdog_device struct, which is a pointer to const struct watchdog_ops.
Make it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210727223042.48150-3-rikard.falkeborn@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2021-08-22 10:28:10 +02:00
Guenter Roeck 09fb6d010a watchdog: tqmx86_wdt: Use 'dev' instead of dereferencing it repeatedly
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly.

The conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2019-05-05 21:02:31 +02:00
Dan Carpenter 4a22fc534f watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs
These functions return NULL on error but we accidentally check
for IS_ERR() instead.

Fixes: e3c21e088f ("watchdog: tqmx86: Add watchdog driver for the IO controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2019-01-07 10:10:35 +01:00
Andrew Lunn e3c21e088f watchdog: tqmx86: Add watchdog driver for the IO controller
Some TQ-Systems ComExpress modules have an IO controller with a
watchdog timer.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2018-12-24 13:15:07 +01:00