summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/jz4740.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/jz4740.c')
-rw-r--r--drivers/watchdog/jz4740.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/watchdog/jz4740.c b/drivers/watchdog/jz4740.c
index 85a1c1d1e9..f28bb9177a 100644
--- a/drivers/watchdog/jz4740.c
+++ b/drivers/watchdog/jz4740.c
@@ -67,14 +67,16 @@ static void __noreturn jz4740_reset_soc(struct restart_handler *rst)
static int jz4740_wdt_probe(struct device_d *dev)
{
+ struct resource *iores;
struct jz4740_wdt_drvdata *priv;
priv = xzalloc(sizeof(struct jz4740_wdt_drvdata));
- priv->base = dev_request_mem_region(dev, 0);
- if (IS_ERR(priv->base)) {
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores)) {
dev_err(dev, "could not get memory region\n");
- return PTR_ERR(priv->base);
+ return PTR_ERR(iores);
}
+ priv->base = IOMEM(iores->start);
dev->priv = priv;