aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-05watchdog: Use depends instead of select for pretimeout governorsGuenter Roeck1-14/+16
Watchdog pretimeout governors were enabled from the default governor selection using "select". As a result, the default governor was always built into the kernel, even if no watchdog driver was loaded. By using "depends on" instead of "select", we are in better control, and the governors can all be built as modules. At the same time, set the default configuration option for pretimeout governors to match WATCHDOG_CORE (meaning all pretimeout governors are by default enabled if pretimeout support is enabled). The practical impact of this change is minimal. Previously, selecting a default governor automatically enabled that governor. Now, a default governor can only be selected if that governor has been enabled. Consequently, the order of governor selection is now reversed: The governor selection is now first, followed by default governor selection. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: rtd119x: drop unused module.h includePaul Gortmaker1-1/+0
The Kconfig for this driver is: config RTD119X_WATCHDOG bool "Realtek RTD118x/RTD129x watchdog support" ...and hence it doesn't need to include module.h for anything. There are no other signs of unused modular infrastructure. Cc: Wim Van Sebroeck <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: intel_scu: make it explicitly non-modularPaul Gortmaker1-18/+0
The Kconfig currently controlling compilation of this code is: config INTEL_SCU_WATCHDOG bool "Intel SCU Watchdog for Mobile Platforms" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We leave the moduleparam.h include since the file does declare some module parameters, and leaving them as such is currently the easiest way to remain compatible with existing boot arg use cases. Cc: Wim Van Sebroeck <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: coh901327: make it explicitly non-modularPaul Gortmaker1-20/+4
The Kconfig currently controlling compilation of this code is: config COH901327_WATCHDOG bool "ST-Ericsson COH 901 327 watchdog" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_ALIAS is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We replace module.h with moduleparam.h since the file does actually declare some module parameters (i.e. boot args for non-modules). Cc: Linus Walleij <[email protected]> Cc: Wim Van Sebroeck <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ziirave_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-5/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: xen_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: stm32_iwdg: drop warning after calling watchdog_init_timeoutWolfram Sang1-4/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: st_lpc_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sp5100_tco: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: renesas_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: nic7018_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-4/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ni903x_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: imx_sc_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-4/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: i6300esb: drop warning after calling watchdog_init_timeoutWolfram Sang1-4/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: hpwdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-2/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Tested-by: Jerry Hoemann <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ebc-c384_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-4/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: cadence_wdt: still probe if user supplied timeout is invalidWolfram Sang1-4/+1
We have a default timeout value in the driver which we will fall back to if the user supplied values are out of bounce. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: cadence_wdt: drop warning after calling watchdog_init_timeoutWolfram Sang1-3/+1
The core will print out details now. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: add error messages when initializing timeout failsWolfram Sang1-0/+9
This not only removes boilerplate code from watchdog drivers, it can also be more specific which of the supplied value actually fails. Also, the loglevel becomes now consistent across drivers. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: refactor watchdog_init_timeoutWolfram Sang1-14/+19
The function is not easy to read and has a problem: -EINVAL is returned when the module parameter is invalid but the DT parameter is OK. Refactor the code to have the same pattern of checks for the module parameter and DT. Further ones can be easily added in the future if the need arises. The above mentioned problem is fixed, too. Some documentation is added to describe the different handlings of '0' for the module parameter and the DT property. Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: renesas_wdt: drop superfluous glob patternWolfram Sang1-1/+0
If we want to match all revisions, it is enough to leave the field empty. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: da9063_wdt: parse DT for timeout value, tooWolfram Sang1-4/+6
And make sure the final obtained value gets properly scaled. Remove two empty lines to group the initialization blocks while we are here. Signed-off-by: Wolfram Sang <[email protected]> Tested-by: Steve Twiss <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: intel_scu_watchdog: fix spelling mistake: "set_hearbeat" -> ↵Colin Ian King1-1/+1
"set_heartbeat" There is a spelling mistake in a pr_debug message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: pnx4008: readout watchdog stateAlexandre Belloni1-1/+2
Readout the enabled state so it is possible to get the pre-userspace handler working. Also, avoid disabling the watchdog to ensure it continues working and triggers if there is an issue later in the boot or if userspace fails to start. Signed-off-by: Alexandre Belloni <[email protected]> Tested-by: Gregory CLEMENT <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: machzwd: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/watchdog/machzwd.c: In function ‘zf_set_timer’: ./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-fallthrough=] #define outw outw drivers/watchdog/machzwd.c:80:53: note: in expansion of macro ‘outw’ #define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); } ^~~~ drivers/watchdog/machzwd.c:179:3: note: in expansion of macro ‘zf_writew’ zf_writew(COUNTER_1, new); ^~~~~~~~~ drivers/watchdog/machzwd.c:180:2: note: here case WD2: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: pnx4008_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-21/+17
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Cc: Vladimir Zapolskiy <[email protected]> Cc: Sylvain Lemieux <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: mpc8xxx_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-14/+3
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function This also drops the inaccurate message on remove; the driver won't be removed if the hardware watchdog is running, no matter if the watchdog device is open or not. - Use local variable 'struct device *dev' consistently - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: jz4740_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-7/+6
Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly. Also, there is no call to dev_get_drvdata() or platform_get_drvdata() in the driver, so drop the unnecessary call to platform_set_drvdata(). 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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: rt2880_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-20/+8
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop empty remove function - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: mt7621_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-3/+4
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 Cc: Matthias Brugger <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: loongson1_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-27/+21
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop unnecessary braces around conditional return statements - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Cc: Keguang Zhang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: pic32-wdt: Convert to use device managed functions and other ↵Guenter Roeck1-34/+24
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: pic32-dmt: Convert to use device managed functions and other ↵Guenter Roeck1-27/+19
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ux500_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-12/+5
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop empty remove function - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: stm32_iwdg: Convert to use device managed functions and other ↵Guenter Roeck1-34/+31
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Cc: Maxime Coquelin <[email protected]> Cc: Alexandre Torgue <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: zx2967_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-20/+13
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Use local variable 'struct device *dev' consistently - Use devm_watchdog_register_driver() to register watchdog device Cc: Jun Nie <[email protected]> Cc: Shawn Guo <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sbsa_gwdt: Convert to use device managed functions and other ↵Guenter Roeck1-19/+2
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Use local variable 'struct device *dev' consistently - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: imx_sc_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-6/+7
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 Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Pengutronix Kernel Team <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: NXP Linux Team <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: xen_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-9/+9
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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: wm831x_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-10/+9
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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: wdat_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-13/+14
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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: uniphier_wdt: drop platform_set_drvdataGuenter Roeck1-2/+0
There is no call to dev_get_drvdata() or platform_get_drvdata() in the driver. Drop the unnecessary call to platform_set_drvdata(). 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 Cc: Masahiro Yamada <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: twl4030_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-18/+4
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ts72xx_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-5/+6
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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ts4800_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-22/+11
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop empty remove function - Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly - Use devm_watchdog_register_driver() to register watchdog device Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: tqmx86_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-7/+7
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 <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: tegra_wdt: Use watchdog_stop_on_unregister and other improvementsGuenter Roeck1-19/+7
Use watchdog_stop_on_unregister() in probe instead of calling tegra_wdt_stop() in the remove function. Also introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly. Finally, drop the now empty remove function. 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 Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: wdat_wdt: fix get_timeleft call for wdat_wdtBryan Tan1-1/+1
The get_timeleft call for wdat_wdt was using ACPI_WDAT_GET_COUNTDOWN when running an action on the device, which would return the configured countdown, instead of ACPI_WDAT_GET_CURRENT_COUNTDOWN, which returns the time left before the watchdog will fire. This change corrects that. Signed-off-by: Bryan Tan <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: tangox_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-23/+14
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. 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 - Drop assignments to otherwise unused variables - Drop unnecessary braces around conditional return statements - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Replace stop on remove with call to watchdog_stop_on_unregister() - Use devm_watchdog_register_driver() to register watchdog device Cc: Marc Gonzalez <[email protected]> Cc: Mans Rullgard <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Mans Rullgard <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sunxi_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-7/+8
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 Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>