cdev: When creating a new cdev, initialize device_node
If a new cdev doesn't have a device_node defined when passed to
devfs_create(), set it to the device_node of the parent device, if one
exists.

For non-partitions, like ocotp or eeprom devices, this is the correct
thing to do.  Partitions need to use, and do use, a different node.

The code from commit 274e0b8 to set
device_node in ocotp can be removed.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent a3544b1 commit 94a4dc04d4cbdf3e4f209e17ad2d5aa0de9f48b3
@Trent Piepho Trent Piepho authored on 10 Dec 2015
Sascha Hauer committed on 8 Jan 2016
Showing 2 changed files
View
arch/arm/mach-imx/ocotp.c
View
fs/devfs-core.c