From 6551881c86c791237a3bebf11eb3bd70b60ea782 Mon Sep 17 00:00:00 2001 From: Pratyush Anand Date: Thu, 20 Aug 2015 14:05:01 +0530 Subject: Watchdog: Fix parent of watchdog_devices /sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by: Pratyush Anand Reviewed-by: Johannes Thumshirn Acked-by: Guenter Roeck Acked-by: H Hartley Sweeten Acked-by: Lee Jones Acked-by: Lubomir Rintel Acked-by: Maxime Coquelin Acked-by: Thierry Reding Acked-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/da9062_wdt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/watchdog/da9062_wdt.c') diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index b3a870ce85be..7386111220d5 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -210,6 +210,7 @@ static int da9062_wdt_probe(struct platform_device *pdev) wdt->wdtdev.max_timeout = DA9062_WDT_MAX_TIMEOUT; wdt->wdtdev.timeout = DA9062_WDG_DEFAULT_TIMEOUT; wdt->wdtdev.status = WATCHDOG_NOWAYOUT_INIT_STATUS; + wdt->wdtdev.parent = &pdev->dev; watchdog_set_drvdata(&wdt->wdtdev, wdt); dev_set_drvdata(&pdev->dev, wdt); -- cgit v1.2.3