Hi Baruch, Thanks a lot for the question. On 18/08/2015:08:41:36 AM, Baruch Siach wrote: > Hi Pratyush Anand, > > On Tue, Aug 18, 2015 at 10:18:01AM +0530, Pratyush Anand wrote: > > Fix parent of watchdog_device so that /sys/class/watchdog/watchdogn/device > > is populated. > > > > cc: Baruch Siach <baruch@xxxxxxxxxx> > > Signed-off-by: Pratyush Anand <panand@xxxxxxxxxx> > > --- > > drivers/watchdog/digicolor_wdt.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/watchdog/digicolor_wdt.c b/drivers/watchdog/digicolor_wdt.c > > index 31d8e4936611..50abe1bf62a5 100644 > > --- a/drivers/watchdog/digicolor_wdt.c > > +++ b/drivers/watchdog/digicolor_wdt.c > > @@ -143,6 +143,7 @@ static int dc_wdt_probe(struct platform_device *pdev) > > } > > dc_wdt_wdd.max_timeout = U32_MAX / clk_get_rate(wdt->clk); > > dc_wdt_wdd.timeout = dc_wdt_wdd.max_timeout; > > + dc_wdt_wdd.parent = &pdev->dev; > > Is there a reasonable way do this for all drivers (at least by default) in > generic code? watchdog_register_device does not have a arg with strcut device *. Probably, we can do it in watchdog_init_timeout as a default. But, all the driver does not call watchdog_init_timeout :( $ git grep watchdog_init_timeout drivers/watchdog/ | wc -l 29 $ git grep watchdog_register_device drivers/watchdog/ | wc -l 67 So, Other than the implementation in patch series, I do not see a way either without changing watchdog_register_device prototype, or without calling watchdog_init_timeout from each driver. ~Pratyush -- 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