aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pnx4008_wdt.c
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: Convert release_resource to release_region/release_mem_regionJulia Lawall2011-03-291-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Request_mem_region should be used with release_mem_region, not release_resource. In pnx4008_wdt.c, a missing clk_put is added as well. The semantic match that finds the first problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,E; @@ *x = request_mem_region(...) ... when != release_mem_region(x) when != x = E * release_resource(x); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: stable <stable@kernel.org>
* watchdog: cleanup spaces before tabsWim Van Sebroeck2011-03-151-1/+1
| | | | | | | cleanup spaces before tabs in drivers/watchdog/ Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* ARM: PNX4008: convert watchdog to use clk API enable/disable callsRussell King2010-02-121-13/+24
| | | | | | | | | clk_set_rate() is not supposed to be used to turn clocks on and off. That's what clk_enable/clk_disable is for. Acked-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: PNX4008: convert watchdog clocks to match by device onlyRussell King2010-02-121-1/+1
| | | | | | Acked-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [WATCHDOG] use resource_size()H Hartley Sweeten2009-12-231-1/+1
| | | | | | | | | | | | | | | | Use resource_size(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Kevin Hilman <khilman@ti.deeprootsystems.com> Cc: Ulrik Bech Hald <ubh@ti.com> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Vincent Sanders <support@simtec.co.uk> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* ARM: PNX4008: fix watchdog device driver nameRussell King2009-11-201-2/+2
| | | | | | | The PNX core code calls the device 'pnx4008-watchdog' not 'watchdog' Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] move platform probe and remove function to devinit and devexitWim Van Sebroeck2009-06-181-3/+3
| | | | | | | | | | | A pointer to probe and remove functions is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] More coding-style and trivial clean-upWim Van Sebroeck2009-03-251-9/+9
| | | | | | | Some more cleaning-up of the watchdog drivers. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] unlocked_ioctl changesWim Van Sebroeck2008-09-231-2/+2
| | | | | | | Fix some drivers so that they use the unlocked_ioctl call. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Merge Linus' latest into masterRussell King2008-08-081-16/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/watchdog/at91rm9200_wdt.c drivers/watchdog/davinci_wdt.c drivers/watchdog/ep93xx_wdt.c drivers/watchdog/ixp2000_wdt.c drivers/watchdog/ixp4xx_wdt.c drivers/watchdog/ks8695_wdt.c drivers/watchdog/omap_wdt.c drivers/watchdog/pnx4008_wdt.c drivers/watchdog/sa1100_wdt.c drivers/watchdog/wdt285.c
| * [WATCHDOG] Coding style - Indentation - part 2Wim Van Sebroeck2008-08-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the watchdog drivers into line with coding style. This patch takes cares of the indentation as described in chapter 1. Main changes: * Re-structure the ioctl switch call for all drivers as follows: switch (cmd) { case WDIOC_GETSUPPORT: case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: case WDIOC_GETTEMP: case WDIOC_SETOPTIONS: case WDIOC_KEEPALIVE: case WDIOC_SETTIMEOUT: case WDIOC_GETTIMEOUT: case WDIOC_GETTIMELEFT: default: } This to make the migration from the drivers to the uniform watchdog device driver easier in the future. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * [WATCHDOG] Clean-up includesWim Van Sebroeck2008-08-061-2/+2
| | | | | | | | | | | | | | | | | | Use #include <linux/io.h> instead of <asm/io.h> Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Clean-up includes. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * [WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setupAlan Cox2008-06-211-10/+8
| | | | | | | | | | | | | | | | Review and switch to unlocked_ioctl Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-1/+1
| | | | | | | | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
|/ | | | | | | | | Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* watchdog: fix platform driver hotplug/coldplugKay Sievers2008-04-111-0/+2
| | | | | | | | | | | | | | Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable watchdog drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: more drivers; registration fixes] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [WATCHDOG] spin_lock_init() fixesAlexey Dobriyan2007-11-021-3/+1
| | | | | | | | | | | | Some watchdog drivers initialize global spinlocks in module's init function which is tolerable, but some do it in PCI probe function. So, switch to static initialization to fix theoretical bugs and, more importantly, stop giving people bad examples. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] trivial fix two returns in void functionsFlorian Fainelli2007-10-251-1/+1
| | | | | | | | | This patch fixes two returns in the TI Davinci and PNX4008 in void functions. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* mv watchdog tree under driversWim Van Sebroeck2007-10-181-0/+358
move watchdog tree from drivers/char/watchdog to drivers/watchdog. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>