diff options
Diffstat (limited to 'drivers/watchdog/orion_wdt.c')
-rw-r--r-- | drivers/watchdog/orion_wdt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index c20f96b579d9..7c18b3bffcf7 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -142,7 +142,7 @@ static struct watchdog_device orion_wdt = { .ops = &orion_wdt_ops, }; -static int __devinit orion_wdt_probe(struct platform_device *pdev) +static int orion_wdt_probe(struct platform_device *pdev) { struct resource *res; int ret; @@ -156,6 +156,8 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev) wdt_tclk = clk_get_rate(clk); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENODEV; wdt_reg = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!wdt_reg) return -ENOMEM; @@ -181,7 +183,7 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev) return 0; } -static int __devexit orion_wdt_remove(struct platform_device *pdev) +static int orion_wdt_remove(struct platform_device *pdev) { watchdog_unregister_device(&orion_wdt); clk_disable_unprepare(clk); @@ -193,7 +195,7 @@ static void orion_wdt_shutdown(struct platform_device *pdev) orion_wdt_stop(&orion_wdt); } -static const struct of_device_id orion_wdt_of_match_table[] __devinitdata = { +static const struct of_device_id orion_wdt_of_match_table[] = { { .compatible = "marvell,orion-wdt", }, {}, }; @@ -201,7 +203,7 @@ MODULE_DEVICE_TABLE(of, orion_wdt_of_match_table); static struct platform_driver orion_wdt_driver = { .probe = orion_wdt_probe, - .remove = __devexit_p(orion_wdt_remove), + .remove = orion_wdt_remove, .shutdown = orion_wdt_shutdown, .driver = { .owner = THIS_MODULE, |