- 25 2月, 2017 40 次提交
-
-
由 H Hartley Sweeten 提交于
Cleanup this driver and convert it to use the watchdog framework API. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Mika Westerberg <mika.westerberg@iki.fi> [groeck: Dropped initialization of static variable] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 H Hartley Sweeten 提交于
Cleanup this driver and remove the 200ms heartbeat timer. The core now has the ability to handle the heartbeat. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> [groeck: Dropped 0-initialization of static variable] Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Without this dependency, platforms not supporting PCI (such as m68k) report the following build warning when building allmodconfig or allyesconfig. drivers/watchdog/rdc321x_wdt.c: In function 'rdc321x_wdt_ioctl': ./arch/m68k/include/asm/uaccess_mm.h:61:1: warning: 'value' may be used uninitialized in this function Fixes: f4c3de659054 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Linus Walleij 提交于
This add support for the Cortina systems Gemini (SL3516) SoC watchdog. I have tried to use all the right new kernel interfaces and tested with busybox' "watchdog" command both to kick and get timeouts and reboots. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Linus Walleij 提交于
This adds DT bindings for the Cortina systems Gemini SoC watchdog timer. Cc: devicetree@vger.kernel.org Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Bhumika Goyal 提交于
Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct watchdog_ops x@p={...}; @ok@ struct watchdog_device w; identifier r.x; position p; @@ w.ops=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct watchdog_ops x; File size details before and after patching. First line of every .o file shows the file size before patching and second line shows the size after patching. text data bss dec hex filename 1340 544 0 1884 75c drivers/watchdog/bcm_kona_wdt.o 1436 440 0 1876 754 drivers/watchdog/bcm_kona_wdt.o 1176 544 4 1724 6bc drivers/watchdog/digicolor_wdt.o 1272 440 4 1716 6b4 drivers/watchdog/digicolor_wdt.o 925 580 89 1594 63a drivers/watchdog/ep93xx_wdt.o 1021 476 89 1586 632 drivers/watchdog/ep93xx_wdt.o 4932 288 17 5237 1475 drivers/watchdog/s3c2410_wdt.o 5028 192 17 5237 1475 drivers/watchdog/s3c2410_wdt.o 1977 292 1 2270 8de drivers/watchdog/sama5d4_wdt.o 2073 196 1 2270 8de drivers/watchdog/sama5d4_wdt.o 1375 484 1 1860 744 drivers/watchdog/sirfsoc_wdt.o 1471 380 1 1852 73c drivers/watchdog/sirfsoc_wdt.o Size remains the same for the files drivers/watchdog/diag288_wdt.o drivers/watchdog/asm9260_wdt.o and drivers/watchdog/atlas7_wdt.o The following .o files did not compile: drivers/watchdog/sun4v_wdt.o, drivers/watchdog/sbsa_gwdt.o, drivers/watchdog/rt2880_wdt.o, drivers/watchdog/booke_wdt.o drivers/watchdog/mt7621_wdt.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Many watchdog drivers explicitly stop the watchdog when unregistering it. While it is unclear if this is actually needed (the whatdog should not be running at that time if it can be stopped), introduce a helper to explicitly stop the watchdog in the watchdog core when unregistering it. This helps reducing driver code size while retaining functionality. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 William Breathitt Gray 提交于
The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the watchdog_register_device call with the devm_watchdog_register_device call. In addition, the ebc_c384_wdt_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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_watchdog_register_driver() to register watchdog device Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace 'val = e; return val;' with 'return e;' - Replace 'if (e) return e; return 0;' with 'return e;' - Drop assignments to otherwise unused variables - Drop unused variables - Drop remove function - Drop dev_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop dev_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace 'goto l; ... l: return e;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace of_iomap() with platform_get_resource() followed by devm_ioremap_resource() - Replace &pdev->dev with dev if 'struct device *dev' is a declared variable - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Lee Jones <lee@kernel.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Acked-by: NEric Anholt <eric@anholt.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 'goto l; ... l: return e;' with 'return e;' - Drop assignments to otherwise unused variables - Drop remove function - Drop unnecessary mutex_destroy() on allocated data - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NJohannes Thumshirn <morbidrsa@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Replace 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 'goto l; ... l: return e;' with 'return e;' - Replace 'val = e; return val;' with 'return e;' - Drop assignments to otherwise unused variables - Replace 'if (e) { return expr; }' with 'if (e) return expr;' - Drop remove function - Replace of_iomap() with platform_get_resource() followed by devm_ioremap_resource() - Drop platform_set_drvdata() - Replace &pdev->dev with dev if 'struct device *dev' is a declared variable - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Acked-by: NBaruch Siach <baruch@tkos.co.il> Tested-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
The shutdown function calls the stop function. Call watchdog_stop_on_reboot() from probe instead. 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 shutdown function with call to watchdog_stop_on_reboot() Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Carlo Caione <carlo@caione.org> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Chen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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 - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Acked-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use a local dev variable instead of dereferencing pdev->dev several times in the probe function to make the code easier to read. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Map resources using devm_ioremap_resource() to simplify error handling. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Enabling the clock before accessing chip registers and disabling it afterwards does not really make sense and only adds complexity to the driver. In addition to that, a comment int the driver suggests that it does not serve a useful purpose either. "The watchdog block is of course always clocked, the clk_enable()/clk_disable() calls are mainly for performing reference counting higher up in the clock hierarchy." Just keep the clock enabled instead. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Checking if there is no error followed by a goto if there is one is confusing. Reverse the logic. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use the infrastructure provided by the watchdog core to install the restart handler. Acked-by: NEric Anholt <eric@anholt.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use the infrastructure provided by the watchdog core to install the restart handler. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Platform data was already validated in the probe function. If it was NULL, the remove function will never be called. Remove the unnecessary check. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
The 'ret' variable in iTCO_wdt_init_module() does not add any value; drop it. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Use pdev for struct platform_device, pci_dev for struct pci_dev, and dev for struct device variables to improve consistency. Remove 'struct platform_device *dev;' from struct iTCO_wdt_private since it was unused. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Using device managed resources simplifies error handling and cleanup, and to reduce the likelyhood of errors. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Allocate private data and the watchdog device to avoid having to clear it on remove and to enable subsequent simplifications. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Colin Ian King 提交于
Trivial fix to spelling mistake in WARN message Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Building all watchdog drivers is all but impossible since many depend on platforms which are not enabled by test builds. Add dependency on COMPILE_TEST where possible to improve the situation. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
pnx833x_wdt does not compile if enabled. Bit operations expect an unsigned long as argument. If that is fixed, the build still fails because put_user, get_user, and copy_to_user are undefined. Mark it as broken. Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Hui Chun Ong 提交于
Add support for the watchdog timer on PXI Embedded Controller. Signed-off-by: NHui Chun Ong <hui.chun.ong@ni.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Bhumika Goyal 提交于
Declare watchdog_info structures as const as they are only stored in the info field of watchdog_device structures. This field is of type const struct watchdog_info *, so watchdog_info structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_info i@p={...}; @ok@ identifier r1.i; position p; struct watchdog_device obj; @@ obj.info=&i@p; @bad@ position p!={r1.p,ok.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct watchdog_info i; Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NBaruch Siach <baruch@tkos.co.il> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-