aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2015-06-02 08:46:18 -0400
committerWim Van Sebroeck <wim@iguana.be>2015-06-22 09:54:33 -0400
commit8135193ceba383e336b2449589db930ea02807d2 (patch)
treeaef68e828175bfb6dcf1d119bf83ea62183b00be
parent57337db1b9f96b897d2404531d8b6375667723fa (diff)
watchdog: imx2_wdt: set watchdog parent device
If on watchdog device registration a parent device is not set, then the registered watchdog is considered to be a virtual device: /sys/devices/virtual/watchdog/watchdog0 /sys/devices/virtual/watchdog/watchdog1 Setting a correct reference to a platform device allows to distinguish multiple instances of iMX2+ hardware watchdogs: /sys/devices/soc0/soc/2000000.aips-bus/20bc000.wdog/watchdog/watchdog0 /sys/devices/soc0/soc/2000000.aips-bus/20c0000.wdog/watchdog/watchdog1 Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r--drivers/watchdog/imx2_wdt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 7cee4024ebfb..2acdd17025c4 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -258,6 +258,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
258 wdog->ops = &imx2_wdt_ops; 258 wdog->ops = &imx2_wdt_ops;
259 wdog->min_timeout = 1; 259 wdog->min_timeout = 1;
260 wdog->max_timeout = IMX2_WDT_MAX_TIME; 260 wdog->max_timeout = IMX2_WDT_MAX_TIME;
261 wdog->parent = &pdev->dev;
261 262
262 clk_prepare_enable(wdev->clk); 263 clk_prepare_enable(wdev->clk);
263 264