aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/mpc8xxx_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/mpc8xxx_wdt.c')
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 8fa213cdb499..ea438ad53055 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -185,15 +185,18 @@ static struct miscdevice mpc8xxx_wdt_miscdev = {
185 .fops = &mpc8xxx_wdt_fops, 185 .fops = &mpc8xxx_wdt_fops,
186}; 186};
187 187
188static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev, 188static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
189 const struct of_device_id *match)
190{ 189{
191 int ret; 190 int ret;
192 struct device_node *np = ofdev->dev.of_node; 191 struct device_node *np = ofdev->dev.of_node;
193 struct mpc8xxx_wdt_type *wdt_type = match->data; 192 struct mpc8xxx_wdt_type *wdt_type;
194 u32 freq = fsl_get_sys_freq(); 193 u32 freq = fsl_get_sys_freq();
195 bool enabled; 194 bool enabled;
196 195
196 if (!ofdev->dev.of_match)
197 return -EINVAL;
198 wdt_type = match->data;
199
197 if (!freq || freq == -1) 200 if (!freq || freq == -1)
198 return -EINVAL; 201 return -EINVAL;
199 202
@@ -272,7 +275,7 @@ static const struct of_device_id mpc8xxx_wdt_match[] = {
272}; 275};
273MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); 276MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
274 277
275static struct of_platform_driver mpc8xxx_wdt_driver = { 278static struct platform_driver mpc8xxx_wdt_driver = {
276 .probe = mpc8xxx_wdt_probe, 279 .probe = mpc8xxx_wdt_probe,
277 .remove = __devexit_p(mpc8xxx_wdt_remove), 280 .remove = __devexit_p(mpc8xxx_wdt_remove),
278 .driver = { 281 .driver = {
@@ -308,13 +311,13 @@ module_init(mpc8xxx_wdt_init_late);
308 311
309static int __init mpc8xxx_wdt_init(void) 312static int __init mpc8xxx_wdt_init(void)
310{ 313{
311 return of_register_platform_driver(&mpc8xxx_wdt_driver); 314 return platform_driver_register(&mpc8xxx_wdt_driver);
312} 315}
313arch_initcall(mpc8xxx_wdt_init); 316arch_initcall(mpc8xxx_wdt_init);
314 317
315static void __exit mpc8xxx_wdt_exit(void) 318static void __exit mpc8xxx_wdt_exit(void)
316{ 319{
317 of_unregister_platform_driver(&mpc8xxx_wdt_driver); 320 platform_driver_unregister(&mpc8xxx_wdt_driver);
318} 321}
319module_exit(mpc8xxx_wdt_exit); 322module_exit(mpc8xxx_wdt_exit);
320 323