diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 10:29:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 10:29:23 -0800 |
commit | 88266917b518e2ca954d85983470592aaaf82993 (patch) | |
tree | e8c6e77cf6c70de0dbe655ce3cd4401391a06b6e /drivers | |
parent | 269d430131b699c2cadf58495f025a4092959ef5 (diff) | |
parent | e2bf7c4c22939bd83814d8da40a352d246030b1b (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: omap_wdt.c: fix the WDIOC_GETBOOTSTATUS ioctl if not implemented.
watchdog: new driver for VIA chipsets
watchdog: ath79_wdt: flush register writes
drivers/watchdog/lantiq_wdt.c: drop iounmap for devm_ allocated data
watchdog: documentation: describe nowayout in coversion-guide
watchdog: documentation: update index file
watchdog: Convert wm831x driver to devm_kzalloc()
watchdog: add nowayout helpers to Watchdog Timer Driver Kernel API
watchdog: convert drivers/watchdog/* to use module_platform_driver()
watchdog: Use DEFINE_SPINLOCK() for static spinlocks
watchdog: Convert Wolfson drivers to module_platform_driver
Diffstat (limited to 'drivers')
35 files changed, 325 insertions, 284 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 79fd606b7cd..877b107f77a 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -772,6 +772,19 @@ config SMSC37B787_WDT Most people will say N. +config VIA_WDT + tristate "VIA Watchdog Timer" + depends on X86 + select WATCHDOG_CORE + ---help--- + This is the driver for the hardware watchdog timer on VIA + southbridge chipset CX700, VX800/VX820 or VX855/VX875. + + To compile this driver as a module, choose M here; the module + will be called via_wdt. + + Most people will say N. + config W83627HF_WDT tristate "W83627HF/W83627DHG Watchdog Timer" depends on X86 diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index fe893e91935..e8f479a1640 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -99,6 +99,7 @@ obj-$(CONFIG_SBC7240_WDT) += sbc7240_wdt.o obj-$(CONFIG_CPU5_WDT) += cpu5wdt.o obj-$(CONFIG_SMSC_SCH311X_WDT) += sch311x_wdt.o obj-$(CONFIG_SMSC37B787_WDT) += smsc37b787_wdt.o +obj-$(CONFIG_VIA_WDT) += via_wdt.o obj-$(CONFIG_W83627HF_WDT) += w83627hf_wdt.o obj-$(CONFIG_W83697HF_WDT) += w83697hf_wdt.o obj-$(CONFIG_W83697UG_WDT) += w83697ug_wdt.o diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index b2922178359..502773ad5ac 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c @@ -70,8 +70,8 @@ struct ar7_wdt { }; static unsigned long wdt_is_open; -static spinlock_t wdt_lock; static unsigned expect_close; +static DEFINE_SPINLOCK(wdt_lock); /* XXX currently fixed, allows max margin ~68.72 secs */ #define prescale_value 0xffff @@ -280,8 +280,6 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) { int rc; - spin_lock_init(&wdt_lock); - ar7_regs_wdt = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); if (!ar7_regs_wdt) { @@ -355,15 +353,4 @@ static struct platform_driver ar7_wdt_driver = { }, }; -static int __init ar7_wdt_init(void) -{ - return platform_driver_register(&ar7_wdt_driver); -} - -static void __exit ar7_wdt_cleanup(void) -{ - platform_driver_unregister(&ar7_wdt_driver); -} - -module_init(ar7_wdt_init); -module_exit(ar7_wdt_cleanup); +module_platform_driver(ar7_wdt_driver); diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c index 725c84bfdd7..9db808349f8 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c @@ -68,17 +68,23 @@ static int max_timeout; static inline void ath79_wdt_keepalive(void) { ath79_reset_wr(AR71XX_RESET_REG_WDOG, wdt_freq * timeout); + /* flush write */ + ath79_reset_rr(AR71XX_RESET_REG_WDOG); } static inline void ath79_wdt_enable(void) { ath79_wdt_keepalive(); ath79_reset_wr(AR71XX_RESET_REG_WDOG_CTRL, WDOG_CTRL_ACTION_FCR); + /* flush write */ + ath79_reset_rr(AR71XX_RESET_REG_WDOG_CTRL); } static inline void ath79_wdt_disable(void) { ath79_reset_wr(AR71XX_RESET_REG_WDOG_CTRL, WDOG_CTRL_ACTION_NONE); + /* flush write */ + ath79_reset_rr(AR71XX_RESET_REG_WDOG_CTRL); } static int ath79_wdt_set_timeout(int val) diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c index 5064e831752..8dc7de641e2 100644 --- a/drivers/watchdog/bcm63xx_wdt.c +++ b/drivers/watchdog/bcm63xx_wdt.c @@ -311,18 +311,7 @@ static struct platform_driver bcm63xx_wdt = { } }; -static int __init bcm63xx_wdt_init(void) -{ - return platform_driver_register(&bcm63xx_wdt); -} - -static void __exit bcm63xx_wdt_exit(void) -{ - platform_driver_unregister(&bcm63xx_wdt); -} - -module_init(bcm63xx_wdt_init); -module_exit(bcm63xx_wdt_exit); +module_platform_driver(bcm63xx_wdt); MODULE_AUTHOR("Miguel Gaio <miguel.gaio@efixo.com>"); MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c index edd3475f41d..251c863d71d 100644 --- a/drivers/watchdog/cpu5wdt.c +++ b/drivers/watchdog/cpu5wdt.c @@ -39,7 +39,7 @@ static int verbose; static int port = 0x91; static int ticks = 10000; -static spinlock_t cpu5wdt_lock; +static DEFINE_SPINLOCK(cpu5wdt_lock); #define PFX "cpu5wdt: " @@ -223,7 +223,6 @@ static int __devinit cpu5wdt_init(void) "port=0x%x, verbose=%i\n", port, verbose); init_completion(&cpu5wdt_device.stop); - spin_lock_init(&cpu5wdt_lock); cpu5wdt_device.queue = 0; setup_timer(&cpu5wdt_device.timer, cpu5wdt_trigger, 0); cpu5wdt_device.default_ticks = ticks; diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 1e013e8457b..1b793dfd868 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c @@ -687,15 +687,4 @@ static struct platform_driver cpwd_driver = { .remove = __devexit_p(cpwd_remove), }; -static int __init cpwd_init(void) -{ - return platform_driver_register(&cpwd_driver); -} - -static void __exit cpwd_exit(void) -{ - platform_driver_unregister(&cpwd_driver); -} - -module_init(cpwd_init); -module_exit(cpwd_exit); +module_platform_driver(cpwd_driver); diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 51b5551b4e3..c8c5c8032bc 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -271,18 +271,7 @@ static struct platform_driver platform_wdt_driver = { .remove = __devexit_p(davinci_wdt_remove), }; -static int __init davinci_wdt_init(void) -{ - return platform_driver_register(&platform_wdt_driver); -} - -static void __exit davinci_wdt_exit(void) -{ - platform_driver_unregister(&platform_wdt_driver); -} - -module_init(davinci_wdt_init); -module_exit(davinci_wdt_exit); +module_platform_driver(platform_wdt_driver); MODULE_AUTHOR("Texas Instruments"); MODULE_DESCRIPTION("DaVinci Watchdog Driver"); diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index f10f8c0abba..1b0e3dd81c1 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -358,17 +358,7 @@ static struct platform_driver dw_wdt_driver = { }, }; -static int __init dw_wdt_watchdog_init(void) -{ - return platform_driver_register(&dw_wdt_driver); -} -module_init(dw_wdt_watchdog_init); - -static void __exit dw_wdt_watchdog_exit(void) -{ - platform_driver_unregister(&dw_wdt_driver); -} -module_exit(dw_wdt_watchdog_exit); +module_platform_driver(dw_wdt_driver); MODULE_AUTHOR("Jamie Iles"); MODULE_DESCRIPTION("Synopsys DesignWare Watchdog Driver"); diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c index 41018d429ab..3946c51099c 100644 --- a/drivers/watchdog/eurotechwdt.c +++ b/drivers/watchdog/eurotechwdt.c @@ -64,7 +64,7 @@ static unsigned long eurwdt_is_open; static int eurwdt_timeout; static char eur_expect_close; -static spinlock_t eurwdt_lock; +static DEFINE_SPINLOCK(eurwdt_lock); /* * You must set these - there is no sane way to probe for this board. @@ -446,8 +446,6 @@ static int __init eurwdt_init(void) goto outreg; } - spin_lock_init(&eurwdt_lock); - ret = misc_register(&eurwdt_miscdev); if (ret) { printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n", diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index 195e0f798e7..c7481ad5162 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c @@ -68,7 +68,7 @@ static char asr_expect_close; static unsigned int asr_type, asr_base, asr_length; static unsigned int asr_read_addr, asr_write_addr; static unsigned char asr_toggle_mask, asr_disable_mask; -static spinlock_t asr_lock; +static DEFINE_SPINLOCK(asr_lock); static void __asr_toggle(void) { @@ -386,8 +386,6 @@ static int __init ibmasr_init(void) if (!asr_type) return -ENODEV; - spin_lock_init(&asr_lock); - rc = asr_get_base_address(); if (rc) return rc; diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c index 1cc5609666d..1475e09f9af 100644 --- a/drivers/watchdog/indydog.c +++ b/drivers/watchdog/indydog.c @@ -28,7 +28,7 @@ #define PFX "indydog: " static unsigned long indydog_alive; -static spinlock_t indydog_lock; +static DEFINE_SPINLOCK(indydog_lock); #define WATCHDOG_TIMEOUT 30 /* 30 sec default timeout */ @@ -185,8 +185,6 @@ static int __init watchdog_init(void) { int ret; - spin_lock_init(&indydog_lock); - ret = register_reboot_notifier(&indydog_notifier); if (ret) { printk(KERN_ERR PFX diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c index aef94789019..82fa7a92a8d 100644 --- a/drivers/watchdog/iop_wdt.c +++ b/drivers/watchdog/iop_wdt.c @@ -37,7 +37,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; static unsigned long wdt_status; static unsigned long boot_status; -static spinlock_t wdt_lock; +static DEFINE_SPINLOCK(wdt_lock); #define WDT_IN_USE 0 #define WDT_OK_TO_CLOSE 1 @@ -226,9 +226,6 @@ static int __init iop_wdt_init(void) { int ret; - spin_lock_init(&wdt_lock); - - /* check if the reset was caused by the watchdog timer */ boot_status = (read_rcsr() & IOP_RCSR_WDT) ? WDIOF_CARDRESET : 0; diff --git a/drivers/watchdog/ixp2000_wdt.c b/drivers/watchdog/ixp2000_wdt.c index e86952a7168..084f71aa855 100644 --- a/drivers/watchdog/ixp2000_wdt.c +++ b/drivers/watchdog/ixp2000_wdt.c @@ -32,7 +32,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */ static unsigned long wdt_status; -static spinlock_t wdt_lock; +static DEFINE_SPINLOCK(wdt_lock); #define WDT_IN_USE 0 #define WDT_OK_TO_CLOSE 1 @@ -189,7 +189,6 @@ static int __init ixp2000_wdt_init(void) return -EIO; } wdt_tick_rate = (*IXP2000_T1_CLD * HZ) / 256; - spin_lock_init(&wdt_lock); return misc_register(&ixp2000_wdt_miscdev); } diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c index e02c0ecda26..4fc2e9ac26f 100644 --- a/drivers/watchdog/ixp4xx_wdt.c +++ b/drivers/watchdog/ixp4xx_wdt.c @@ -181,7 +181,6 @@ static int __init ixp4xx_wdt_init(void) return -ENODEV; } - spin_lock_init(&wdt_lock); boot_status = (*IXP4XX_OSST & IXP4XX_OSST_TIMER_WARM_RESET) ? WDIOF_CARDRESET : 0; ret = misc_register(&ixp4xx_wdt_miscdev); diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 684ba01fb54..17ef300bccc 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -295,18 +295,7 @@ static struct platform_driver jz4740_wdt_driver = { }, }; - -static int __init jz4740_wdt_init(void) -{ - return platform_driver_register(&jz4740_wdt_driver); -} -module_init(jz4740_wdt_init); - -static void __exit jz4740_wdt_exit(void) -{ - platform_driver_unregister(&jz4740_wdt_driver); -} -module_exit(jz4740_wdt_exit); +module_platform_driver(jz4740_wdt_driver); MODULE_AUTHOR("Paul Cercueil <paul@crapouillou.net>"); MODULE_DESCRIPTION("jz4740 Watchdog Driver"); diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c index 811471903e8..51757a520e8 100644 --- a/drivers/watchdog/ks8695_wdt.c +++ b/drivers/watchdog/ks8695_wdt.c @@ -42,7 +42,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" static unsigned long ks8695wdt_busy; -static spinlock_t ks8695_lock; +static DEFINE_SPINLOCK(ks8695_lock); /* ......................................................................... */ @@ -288,7 +288,6 @@ static struct platform_driver ks8695wdt_driver = { static int __init ks8695_wdt_init(void) { - spin_lock_init(&ks8695_lock); /* Check that the heartbeat value is within range; if not reset to the default */ if (ks8695_wdt_settimeout(wdt_time)) { diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c index 102aed0efbf..d3a63be2e28 100644 --- a/drivers/watchdog/lantiq_wdt.c +++ b/drivers/watchdog/lantiq_wdt.c @@ -222,9 +222,6 @@ ltq_wdt_remove(struct platform_device *pdev) { misc_deregister(<q_wdt_miscdev); - if (ltq_wdt_membase) - iounmap(ltq_wdt_membase); - return 0; } diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index 73ba2fd8e59..af63ecfbfa6 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c @@ -364,18 +364,7 @@ static struct platform_driver max63xx_wdt_driver = { }, }; -static int __init max63xx_wdt_init(void) -{ - return platform_driver_register(&max63xx_wdt_driver); -} - -static void __exit max63xx_wdt_exit(void) -{ - platform_driver_unregister(&max63xx_wdt_driver); -} - -module_init(max63xx_wdt_init); -module_exit(max63xx_wdt_exit); +module_platform_driver(max63xx_wdt_driver); MODULE_AUTHOR("Marc Zyngier <maz@misterjones.org>"); MODULE_DESCRIPTION("max63xx Watchdog Driver"); diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c index ac37bb82392..c29e31d99fe 100644 --- a/drivers/watchdog/mtx-1_wdt.c +++ b/drivers/watchdog/mtx-1_wdt.c @@ -253,18 +253,7 @@ static struct platform_driver mtx1_wdt_driver = { .driver.owner = THIS_MODULE, }; -static int __init mtx1_wdt_init(void) -{ - return platform_driver_register(&mtx1_wdt_driver); -} - -static void __exit mtx1_wdt_exit(void) -{ - platform_driver_unregister(&mtx1_wdt_driver); -} - -module_init(mtx1_wdt_init); -module_exit(mtx1_wdt_exit); +module_platform_driver(mtx1_wdt_driver); MODULE_AUTHOR("Michael Stickel, Florian Fainelli"); MODULE_DESCRIPTION("Driver for the MTX-1 watchdog"); diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index 6cee33d4b16..50359bad917 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c @@ -334,18 +334,7 @@ static struct platform_driver nuc900wdt_driver = { }, }; -static int __init nuc900_wdt_init(void) -{ - return platform_driver_register(&nuc900wdt_driver); -} - -static void __exit nuc900_wdt_exit(void) -{ - platform_driver_unregister(&nuc900wdt_driver); -} - -module_init(nuc900_wdt_init); -module_exit(nuc900_wdt_exit); +module_platform_driver(nuc900wdt_driver); MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); MODULE_DESCRIPTION("Watchdog driver for NUC900"); diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 4ec741ac952..f359ab85c3b 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -414,18 +414,7 @@ static struct platform_driver xwdt_driver = { }, }; -static int __init xwdt_init(void) -{ - return platform_driver_register(&xwdt_driver); -} - -static void __exit xwdt_exit(void) -{ - platform_driver_unregister(&xwdt_driver); -} - -module_init(xwdt_init); -module_exit(xwdt_exit); +module_platform_driver(xwdt_driver); MODULE_AUTHOR("Alejandro Cabrera <aldaya@gmail.com>"); MODULE_DESCRIPTION("Xilinx Watchdog driver"); diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 2b4acb86c19..4b33e3fd726 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -55,7 +55,7 @@ module_param(timer_margin, uint, 0); MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)"); static unsigned int wdt_trgr_pattern = 0x1234; -static spinlock_t wdt_lock; +static DEFINE_SPINLOCK(wdt_lock); struct omap_wdt_dev { void __iomem *base; /* physical */ @@ -232,6 +232,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, if (cpu_is_omap24xx()) return put_user(omap_prcm_get_reset_sources(), (int __user *)arg); + return put_user(0, (int __user *)arg); case WDIOC_KEEPALIVE: pm_runtime_get_sync(wdev->dev); spin_lock(&wdt_lock); @@ -437,19 +438,7 @@ static struct platform_driver omap_wdt_driver = { }, }; -static int __init omap_wdt_init(void) -{ - spin_lock_init(&wdt_lock); - return platform_driver_register(&omap_wdt_driver); -} - -static void __exit omap_wdt_exit(void) -{ - platform_driver_unregister(&omap_wdt_driver); -} - -module_init(omap_wdt_init); -module_exit(omap_wdt_exit); +module_platform_driver(omap_wdt_driver); MODULE_AUTHOR("George G. Davis"); MODULE_LICENSE("GPL"); diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index 2d9fb96a9ee..4ad78f86851 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -41,7 +41,7 @@ static int heartbeat = -1; /* module parameter (seconds) */ static unsigned int wdt_max_duration; /* (seconds) */ static unsigned int wdt_tclk; static unsigned long wdt_status; -static spinlock_t wdt_lock; +static DEFINE_SPINLOCK(wdt_lock); static void orion_wdt_ping(void) { @@ -294,19 +294,7 @@ static struct platform_driver orion_wdt_driver = { }, }; -static int __init orion_wdt_init(void) -{ - spin_lock_init(&wdt_lock); - return platform_driver_register(&orion_wdt_driver); -} - -static void __exit orion_wdt_exit(void) -{ - platform_driver_unregister(&orion_wdt_driver); -} - -module_init(orion_wdt_init); -module_exit(orion_wdt_exit); +module_platform_driver(orion_wdt_driver); MODULE_AUTHOR("Sylver Bruneau <sylver.bruneau@googlemail.com>"); MODULE_DESCRIPTION("Orion Processor Watchdog"); diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 61493322556..bd143c9dd3e 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -334,18 +334,7 @@ static struct platform_driver platform_wdt_driver = { .remove = __devexit_p(pnx4008_wdt_remove), }; -static int __init pnx4008_wdt_init(void) -{ - return platform_driver_register(&platform_wdt_driver); -} - -static void __exit pnx4008_wdt_exit(void) -{ - platform_driver_unregister(&platform_wdt_driver); -} - -module_init(pnx4008_wdt_init); -module_exit(pnx4008_wdt_exit); +module_platform_driver(platform_wdt_driver); MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); MODULE_DESCRIPTION("PNX4008 Watchdog Driver"); diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c index d4c29b5311a..bf7bc8aa1c0 100644 --- a/drivers/watchdog/rc32434_wdt.c +++ b/drivers/watchdog/rc32434_wdt.c @@ -332,18 +332,7 @@ static struct platform_driver rc32434_wdt_driver = { } }; -static int __init rc32434_wdt_init(void) -{ - return platform_driver_register(&rc32434_wdt_driver); -} - -static void __exit rc32434_wdt_exit(void) -{ - platform_driver_unregister(&rc32434_wdt_driver); -} - -module_init(rc32434_wdt_init); -module_exit(rc32434_wdt_exit); +module_platform_driver(rc32434_wdt_driver); MODULE_AUTHOR("Ondrej Zajicek <santiago@crfreenet.org>," "Florian Fainelli <florian@openwrt.org>"); diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c index 428f8a1583e..042ccc56ae2 100644 --- a/drivers/watchdog/rdc321x_wdt.c +++ b/drivers/watchdog/rdc321x_wdt.c @@ -293,18 +293,7 @@ static struct platform_driver rdc321x_wdt_driver = { }, }; -static int __init rdc321x_wdt_init(void) -{ - return platform_driver_register(&rdc321x_wdt_driver); -} - -static void __exit rdc321x_wdt_exit(void) -{ - platform_driver_unregister(&rdc321x_wdt_driver); -} - -module_init(rdc321x_wdt_init); -module_exit(rdc321x_wdt_exit); +module_platform_driver(rdc321x_wdt_driver); MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); MODULE_DESCRIPTION("RDC321x watchdog driver"); diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 109b533896b..c7e17ceafa6 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c @@ -247,15 +247,4 @@ static struct platform_driver riowd_driver = { .remove = __devexit_p(riowd_remove), }; -static int __init riowd_init(void) -{ - return platform_driver_register(&riowd_driver); -} - -static void __exit riowd_exit(void) -{ - platform_driver_unregister(&riowd_driver); -} - -module_init(riowd_init); -module_exit(riowd_exit); +module_platform_driver(riowd_driver); diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index a79e3840782..4bc3744e14e 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -378,6 +378,8 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) "cannot start\n"); } + watchdog_set_nowayout(&s3c2410_wdd, nowayout); + ret = watchdog_register_device(&s3c2410_wdd); if (ret) { dev_err(dev, "cannot register watchdog (%d)\n", ret); diff --git a/drivers/watchdog/stmp3xxx_wdt.c b/drivers/watchdog/stmp3xxx_wdt.c index ac2346a452e..4c2a4e8698f 100644 --- a/drivers/watchdog/stmp3xxx_wdt.c +++ b/drivers/watchdog/stmp3xxx_wdt.c @@ -272,18 +272,7 @@ static struct platform_driver platform_wdt_driver = { .resume = stmp3xxx_wdt_resume, }; -static int __init stmp3xxx_wdt_init(void) -{ - return platform_driver_register(&platform_wdt_driver); -} - -static void __exit stmp3xxx_wdt_exit(void) -{ - return platform_driver_unregister(&platform_wdt_driver); -} - -module_init(stmp3xxx_wdt_init); -module_exit(stmp3xxx_wdt_exit); +module_platform_driver(platform_wdt_driver); MODULE_DESCRIPTION("STMP3XXX Watchdog Driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index 5a90a4a871d..1490293dc7d 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c @@ -506,17 +506,7 @@ static struct platform_driver ts72xx_wdt_driver = { }, }; -static __init int ts72xx_wdt_init(void) -{ - return platform_driver_register(&ts72xx_wdt_driver); -} -module_init(ts72xx_wdt_init); - -static __exit void ts72xx_wdt_exit(void) -{ - platform_driver_unregister(&ts72xx_wdt_driver); -} -module_exit(ts72xx_wdt_exit); +module_platform_driver(ts72xx_wdt_driver); MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); MODULE_DESCRIPTION("TS-72xx SBC Watchdog"); diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index b5045ca7e61..0764c6239b9 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c @@ -256,17 +256,7 @@ static struct platform_driver twl4030_wdt_ |