aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2007-07-24 11:07:38 -0700
committerWim Van Sebroeck <wim@iguana.be>2007-07-24 18:56:35 +0000
commit422db8d229affd429b5a7389600877aa7dea2704 (patch)
tree2cdd7aaf3519379036dafa930bcfe31488cc91db /drivers/char/watchdog
parent28dd1b0b9191ac9cd0b96fa4d09d951498bfbadb (diff)
downloadkernel_samsung_crespo-422db8d229affd429b5a7389600877aa7dea2704.zip
kernel_samsung_crespo-422db8d229affd429b5a7389600877aa7dea2704.tar.gz
kernel_samsung_crespo-422db8d229affd429b5a7389600877aa7dea2704.tar.bz2
[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')
-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 b887cdb..038f76e 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);