Skip to contentSkip to conversation

watchdog: iTCO_wdt: Fix the parent device

PATCH In review Jean Delvare 3 participants 3 messages Mar 10, 2014 – Mar 15, 2014 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: iTCO_wdt: Fix the parent device

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich (the PCI device.) Setting the parent right makes it much easier for the user to figure out which driver/module is handling the watchdog device node.

Cc Wim Van Sebroeck <[email protected]>
---
 drivers/watchdog/iTCO_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/iTCO_wdt.c +1 -1
@@ -485,7 +485,7 @@ static int iTCO_wdt_probe(struct platfor
 	iTCO_wdt_watchdog_dev.bootstatus = 0;
 	iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
 	watchdog_set_nowayout(&iTCO_wdt_watchdog_dev, nowayout);
-	iTCO_wdt_watchdog_dev.parent = dev->dev.parent;
+	iTCO_wdt_watchdog_dev.parent = &dev->dev;
 
 	/* Make sure the watchdog is not running */
 	iTCO_wdt_stop(&iTCO_wdt_watchdog_dev);
Signature · 2 lines
Jean Delvare
SUSE L3 Support
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jean Delvare

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich (the PCI device.) Setting the parent right makes it much easier for the user to figure out which driver/module is handling the watchdog device node.

Cc Wim Van Sebroeck <[email protected]>

Makes sense to me.

Quoted 25 lines
---
 drivers/watchdog/iTCO_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/iTCO_wdt.c +1 -1
@@ -485,7 +485,7 @@ static int iTCO_wdt_probe(struct platfor
 	iTCO_wdt_watchdog_dev.bootstatus = 0;
 	iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
 	watchdog_set_nowayout(&iTCO_wdt_watchdog_dev, nowayout);
-	iTCO_wdt_watchdog_dev.parent = dev->dev.parent;
+	iTCO_wdt_watchdog_dev.parent = &dev->dev;
 
 	/* Make sure the watchdog is not running */
 	iTCO_wdt_stop(&iTCO_wdt_watchdog_dev);
Signature · 7 lines
-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to Jean Delvare

Hi Jean,

Quoted 16 lines

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich (the PCI device.) Setting the parent right makes it much easier for the user to figure out which driver/module is handling the watchdog device node.

Cc Wim Van Sebroeck <[email protected]>
---
 drivers/watchdog/iTCO_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

drivers/watchdog/iTCO_wdt.c static int iTCO_wdt_probe(struct platfor · line 491

Quoted 8 lines
drivers/watchdog/iTCO_wdt.c +1 -1
@@ -485,7 +485,7 @@ static int iTCO_wdt_probe(struct platfor
 	iTCO_wdt_watchdog_dev.bootstatus = 0;
 	iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
 	watchdog_set_nowayout(&iTCO_wdt_watchdog_dev, nowayout);
-	iTCO_wdt_watchdog_dev.parent = dev->dev.parent;
+	iTCO_wdt_watchdog_dev.parent = &dev->dev;
 
 	/* Make sure the watchdog is not running */
 	iTCO_wdt_stop(&iTCO_wdt_watchdog_dev);

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.