summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/stpmic1_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/stpmic1_wdt.c')
-rw-r--r--drivers/watchdog/stpmic1_wdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c
index eb8c43f..5d9720c 100644
--- a/drivers/watchdog/stpmic1_wdt.c
+++ b/drivers/watchdog/stpmic1_wdt.c
@@ -169,7 +169,10 @@ static int stpmic1_wdt_probe(struct device_d *dev)
int ret;
wdt = xzalloc(sizeof(*wdt));
- wdt->regmap = dev->parent->priv;
+
+ wdt->regmap = dev_get_regmap(dev->parent, NULL);
+ if (IS_ERR(wdt->regmap))
+ return PTR_ERR(wdt->regmap);
wdd = &wdt->wdd;
wdd->hwdev = dev;