[PATCH] watchdog: imx2_wdt: set watchdog parent device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/watchdog/imx2_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 5e6d808..3450a46 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -256,6 +256,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);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux