mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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 <akinobu.mita@gmail.com> Signed-off-by: Wim Van sebroeck <wim@iguana.be>
This commit is contained in:
parent
9f2cc6f759
commit
4c4b638e37
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue