diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-04-09 15:16:34 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-01 07:43:16 +0200 |
commit | 3f68a7698d882f1e1ce5827fac92736e19f76018 (patch) | |
tree | 4322b285f393124fefc5729780ce14dbbbf0a95c /drivers/of | |
parent | 89ca3fcaad55a3847d1a6c576dedfcc9f7394e31 (diff) | |
download | barebox-3f68a7698d882f1e1ce5827fac92736e19f76018.tar.gz barebox-3f68a7698d882f1e1ce5827fac92736e19f76018.tar.xz |
cdev: Add function to find cdev by device_node
This adds a device_node member to struct cdev and a function
to find a cdev by device_node.
This also removes the setting of cdev->dev->device_node in
the of partition parser. We must not set the device since it
may not refer to a partition but to a whole device with partitions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/partition.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c index 3dce84404f..6017897b02 100644 --- a/drivers/of/partition.c +++ b/drivers/of/partition.c @@ -64,8 +64,8 @@ struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node) if (IS_ERR(new)) new = NULL; - if (new && new->dev) - new->dev->device_node = node; + if (new) + new->device_node = node;; free(filename); |