aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-05watchdog: stpmic1_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 Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: stmp3xxx_rtc_wdt: Convert to use device managed functionsGuenter Roeck1-8/+8
Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. 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 - 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: st_lpc_wdt: Convert to use device managed functionsGuenter Roeck1-21/+26
Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. 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 - 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: Patrice Chotard <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Patrice Chotard <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sprd_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-20/+18
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 - Replace devm_add_action() followed by failure action with devm_add_action_or_reset() - Replace 'val = e; return val;' with 'return e;' - 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: sirfsoc_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-18/+6
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 - Replace shutdown function with call to watchdog_stop_on_reboot() - Replace stop on remove with call to watchdog_stop_on_unregister() - Use devm_watchdog_register_driver() to register watchdog device Cc: Barry Song <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sama5d4_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-23/+12
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 - Replace stop on remove with call to watchdog_stop_on_unregister() - Use devm_watchdog_register_driver() to register watchdog device Cc: Nicolas Ferre <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Ludovic Desroches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: rza_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-10/+11
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: rtd119x_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-27/+15
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 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)' - 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: rn5t618_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-4/+5
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: qcom-wdt: Convert to use device managed functions and other ↵Guenter Roeck1-30/+25
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: Andy Gross <[email protected]> Cc: David Brown <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: pm8916_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-10/+11
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: of_xilinx_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-32/+26
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: Michal Simek <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: npcm_wdt: Use local variable 'dev' consistentlyGuenter Roeck1-3/+3
Use local variable 'struct device *dev' consistently. 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: Avi Fishman <[email protected]> Cc: Tomer Maimon <[email protected]> Cc: Patrick Venture <[email protected]> Cc: Nancy Yuen <[email protected]> Cc: Brendan Higgins <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: mtk_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-25/+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 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 - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Matthias Brugger <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: moxart_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-13/+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 - Replace 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)' - Use local variable 'struct device *dev' consistently - Replace stop on remove with call to watchdog_stop_on_unregister() - 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: mlx_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: meson_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: Kevin Hilman <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: meson_gxbb_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-30/+15
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 - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Kevin Hilman <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: menf21bmc_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-23/+10
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 Cc: Andreas Werner <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: mena21_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-15/+13
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: Johannes Thumshirn <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: max77620_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-16/+7
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 - Replace stop on remove with call to watchdog_stop_on_unregister() - 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: max63xx_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-14/+6
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: lpc18xx_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-26/+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 - 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 - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Vladimir Zapolskiy <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: kempld_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-24/+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 - 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: intel-mid_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-11/+11
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: imgpdc_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-55/+36
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 - 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: iTCO_wdt: Various improvementsGuenter Roeck1-12/+1
Various coccinelle driven transformations as detailed 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 - Use watchdog_stop_on_unregister to stop the watchdog on remove - Drop assignments to otherwise unused variables - Drop empty remove function Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: gpio_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-14/+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 Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: ftwdt010_wdt: Use 'dev' consistentlyGuenter Roeck1-1/+1
Use local variable 'dev' consistently. 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: ep93xx_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 Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: davinci_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-25/+16
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 - Use local variable 'struct device *dev' consistently - 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: da9063_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 Cc: Support Opensource <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Steve Twiss <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: da9062_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-12/+8
Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatedly. Also replace 'ret = func(); return ret;' with 'return func();'. 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: Support Opensource <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Steve Twiss <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: da9055_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-6/+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 Cc: Support Opensource <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Steve Twiss <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: da9052_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. 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: Support Opensource <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Steve Twiss <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: cadence_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-56/+27
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 - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - 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: bcm_kona_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-10/+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 - 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() Cc: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: [email protected] Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Ray Jui <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: bcm7038_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-25/+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 - 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: bcm2835_wdt: drop platform_set_drvdataGuenter Roeck1-1/+0
There is no call to platform_get_drvdata() in the driver, so platform_set_drvdata() is unnecessary and can be dropped. 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: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: [email protected] Cc: Eric Anholt <[email protected]> Cc: Stefan Wahren <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Stefan Wahren <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: atlas7_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-42/+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 unnecessary braces around conditional return statements - Drop empty remove function - Use devm_add_action_or_reset() for calls to clk_disable_unprepare - Replace 'of_clk_get(np, 0)' with 'devm_clk_get(dev, NULL)' - 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: aspeed_wdt: Use 'dev' instead of dereferencing it repeatedlyGuenter Roeck1-10/+11
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: Joel Stanley <[email protected]> Cc: Andrew Jeffery <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: asm9260_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-44/+29
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 - Replace 'goto l; ... l: return e;' with 'return e;' - 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: armada_37xx_wdt: Convert to use device managed functions and other ↵Guenter Roeck1-29/+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 - 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: imx2_wdt: Fix set_timeout for big timeout valuesGeorg Hofmann1-1/+3
The documentated behavior is: if max_hw_heartbeat_ms is implemented, the minimum of the set_timeout argument and max_hw_heartbeat_ms should be used. This patch implements this behavior. Previously only the first 7bits were used and the input argument was returned. Signed-off-by: Georg Hofmann <[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 : fix warning Using plain integer as NULL pointerHariprasad Kelam1-1/+1
Changes passing function argument 0 to NULL to avoid below sparse warning CHECK drivers/watchdog//machzwd.c drivers/watchdog//machzwd.c:321:25: warning: Using plain integer as NULL pointer Signed-off-by: Hariprasad Kelam <[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: rtd119x_wdt: Fix remove functionGuenter Roeck1-1/+1
The driver registers the watchdog with devm_watchdog_register_device() but still calls watchdog_unregister_device() on remove. Since clocks have to be stopped when removing the driver, after the watchdog device has been unregistered, we can not drop the call to watchdog_unregister_device(). Use watchdog_register_device() to register the watchdog. Fixes: 2bdf6acbfead7 ("watchdog: Add Realtek RTD1295") Cc: Andreas Färber <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: sb_wdog: Make sbwdog_set and sbwdog_pet staticYueHaibing1-2/+2
Fix sparse warning: drivers/watchdog/sb_wdog.c:70:6: warning: symbol 'sbwdog_set' was not declared. Should it be static? drivers/watchdog/sb_wdog.c:84:6: warning: symbol 'sbwdog_pet' was not declared. Should it be static? Signed-off-by: YueHaibing <[email protected]> Acked-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: alim7101: Mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/watchdog/alim7101_wdt.c: In function ‘fop_ioctl’: drivers/watchdog/alim7101_wdt.c:279:3: warning: this statement may fall through [-Wimplicit-fallthrough=] wdt_keepalive(); ^~~~~~~~~~~~~~~ drivers/watchdog/alim7101_wdt.c:282:2: note: here case WDIOC_GETTIMEOUT: ^~~~ Notice that, in this particular case, the /* Fall through */ comment is placed at the very bottom of the case statement, which is what GCC is expecting to find. Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -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: Convert to use devm_platform_ioremap_resourceGuenter Roeck52-161/+55
Use devm_platform_ioremap_resource to reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patch. @r@ identifier res, pdev; expression a; expression index; expression e; @@ <+... - res = platform_get_resource(pdev, IORESOURCE_MEM, index); - a = devm_ioremap_resource(e, res); + a = devm_platform_ioremap_resource(pdev, index); ...+> @depends on r@ identifier r.res; @@ - struct resource *res; ... when != res @@ identifier res, pdev; expression index; expression a; @@ - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index); - a = devm_ioremap_resource(&pdev->dev, res); + a = devm_platform_ioremap_resource(pdev, index); Cc: Joel Stanley <[email protected]> Cc: Nicolas Ferre <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Baruch Siach <[email protected]> Cc: Keguang Zhang <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Avi Fishman <[email protected]> Cc: Nancy Yuen <[email protected]> Cc: Brendan Higgins <[email protected]> Cc: Wan ZongShun <[email protected]> Cc: Michal Simek <[email protected]> Cc: Sylvain Lemieux <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Barry Song <[email protected]> Cc: Orson Zhai <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Marc Gonzalez <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Shawn Guo <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Tested-by: Alexandre Belloni <[email protected]> Acked-by: Joel Stanley <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Michal Simek <[email protected]> (cadence/xilinx wdts) Acked-by: Thierry Reding <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Patrice Chotard <[email protected]> Acked-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-05-05watchdog: imx2_wdt: use devm_platform_ioremap_resource() to simplify codeAnson Huang1-3/+1
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <[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]>