From: Wim Van Sebroeck Date: Thu, 10 Jun 2010 06:46:56 +0000 (+0000) Subject: watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe... X-Git-Tag: v2.6.36-rc1~290^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c4b638e3718344e4caeb157cfbfde1b6a7b1562;p=profile%2Fivi%2Fkernel-x86-ivi.git watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe() function Set the paranet of the misc_device before we register the misc_device. Reported-by: Akinobu Mita Signed-off-by: Wim Van sebroeck --- diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index 9c40f48..0461858 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c @@ -425,6 +425,8 @@ static int __devinit sch311x_wdt_probe(struct platform_device *pdev) val = therm_trip ? 0x06 : 0x04; outb(val, sch311x_wdt_data.runtime_reg + RESGEN); + sch311x_wdt_miscdev.parent = dev; + err = misc_register(&sch311x_wdt_miscdev); if (err != 0) { dev_err(dev, "cannot register miscdev on minor=%d (err=%d)\n", @@ -432,8 +434,6 @@ static int __devinit sch311x_wdt_probe(struct platform_device *pdev) goto exit_release_region3; } - sch311x_wdt_miscdev.parent = dev; - dev_info(dev, "SMSC SCH311x WDT initialized. timeout=%d sec (nowayout=%d)\n", timeout, nowayout);