aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/cadence_wdt.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-09-24watchdog: constify watchdog_ops structuresJulia Lawall1-1/+1
Check for watchdog_ops structures that are only stored in the ops field of a watchdog_device structure. This field is declared const, so watchdog_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct watchdog_ops i@p = { ... }; @ok@ identifier r.i; struct watchdog_device e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct watchdog_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct watchdog_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2016-09-24watchdog: cadence_wdt: Fix the suspend resumeShubhrajyoti Datta1-7/+11
Currently even if no users are there the suspend tries to stop the watchdog and resume starts it. so after resume the watchdog starts and resets the board. Fix the same by adding a check for users. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-27watchdog: cadence_wdt: use to_platform_device()Geliang Tang1-4/+2
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-13watchdog: cadence_wdt: use core reboot notifierDamien Riegel1-35/+1
Get rid of the custom reboot notifier block registration and use the one provided by the watchdog core. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Vivien Didelot <vivien.didelot@savoirlinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-01-21watchdog: drop owner assignment from platform_driversWolfram Sang1-1/+0
This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-10-20watchdog: Add Cadence WDT driverHarini Katakam1-0/+516
Add Cadence WDT driver. This is used by Xilinx Zynq. Signed-off-by: Harini Katakam <harinik@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>