setting miscdevice.parent after misc_register()

From: Akinobu Mita
Date: Mon Jun 07 2010 - 23:11:50 EST


In drivers/watchdog/at32ap700x_wdt.c, and drivers/watchdog/sch311x_wdt.c
miscdevice.parent is set after misc_register().

drivers/watchdog/at32ap700x_wdt.c:

ret = misc_register(&wdt->miscdev);
...
wdt->miscdev.parent = &pdev->dev;

But it does nothing. (the miscdevice will not be a child of that parent
device in sysfs)

So should it be set before misc_register() or just keep it as-is?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/