From 8135193ceba383e336b2449589db930ea02807d2 Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Tue, 2 Jun 2015 15:46:18 +0300 Subject: 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 Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/imx2_wdt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/watchdog/imx2_wdt.c') 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) wdog->ops = &imx2_wdt_ops; wdog->min_timeout = 1; wdog->max_timeout = IMX2_WDT_MAX_TIME; + wdog->parent = &pdev->dev; clk_prepare_enable(wdev->clk); -- cgit v1.2.3