summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/ocotp.c1
-rw-r--r--fs/devfs-core.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c
index 6ff5ee4efc..c99a003bb0 100644
--- a/arch/arm/mach-imx/ocotp.c
+++ b/arch/arm/mach-imx/ocotp.c
@@ -426,7 +426,6 @@ static int imx_ocotp_probe(struct device_d *dev)
cdev->priv = priv;
cdev->size = 192;
cdev->name = "imx-ocotp";
- cdev->device_node = dev->device_node;
ret = devfs_create(cdev);
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 2541ea36e6..a5ac5a3843 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -260,8 +260,11 @@ int devfs_create(struct cdev *new)
return -EEXIST;
list_add_tail(&new->list, &cdev_list);
- if (new->dev)
+ if (new->dev) {
list_add_tail(&new->devices_list, &new->dev->cdevs);
+ if (!new->device_node)
+ new->device_node = new->dev->device_node;
+ }
return 0;
}