summaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/mv64x60_wdt.c
diff options
context:
space:
mode:
authorDale Farnsworth2007-07-24 20:07:38 +0200
committerWim Van Sebroeck2007-07-24 20:56:35 +0200
commit422db8d229affd429b5a7389600877aa7dea2704 (patch)
tree2cdd7aaf3519379036dafa930bcfe31488cc91db /drivers/char/watchdog/mv64x60_wdt.c
parent[WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt (diff)
downloadkernel-qcow2-linux-422db8d229affd429b5a7389600877aa7dea2704.tar.gz
kernel-qcow2-linux-422db8d229affd429b5a7389600877aa7dea2704.tar.xz
kernel-qcow2-linux-422db8d229affd429b5a7389600877aa7dea2704.zip
[WATCHDOG] mv64x60_wdt: set up platform_device in platform code
The driver previously registered its platform device data in its own init function--that's bogus. Move that code to platform-specific code in arch/ppc. This is being done so that the platform code can decide at runtime whether to initialize this driver or not. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char/watchdog/mv64x60_wdt.c')
-rw-r--r--drivers/char/watchdog/mv64x60_wdt.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c
index b887cdb01334..038f76e39818 100644
--- a/drivers/char/watchdog/mv64x60_wdt.c
+++ b/drivers/char/watchdog/mv64x60_wdt.c
@@ -219,40 +219,16 @@ static struct platform_driver mv64x60_wdt_driver = {
},
};
-static struct platform_device *mv64x60_wdt_dev;
-
static int __init mv64x60_wdt_init(void)
{
- int ret;
-
printk(KERN_INFO "MV64x60 watchdog driver\n");
- mv64x60_wdt_dev = platform_device_alloc(MV64x60_WDT_NAME, -1);
- if (!mv64x60_wdt_dev) {
- ret = -ENOMEM;
- goto out;
- }
-
- ret = platform_device_add(mv64x60_wdt_dev);
- if (ret) {
- platform_device_put(mv64x60_wdt_dev);
- goto out;
- }
-
- ret = platform_driver_register(&mv64x60_wdt_driver);
- if (ret) {
- platform_device_unregister(mv64x60_wdt_dev);
- goto out;
- }
-
- out:
- return ret;
+ return platform_driver_register(&mv64x60_wdt_driver);
}
static void __exit mv64x60_wdt_exit(void)
{
platform_driver_unregister(&mv64x60_wdt_driver);
- platform_device_unregister(mv64x60_wdt_dev);
}
module_init(mv64x60_wdt_init);