summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ofpart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ofpart.c')
-rw-r--r--drivers/mtd/ofpart.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index 9ed6038e47d2..904645143397 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -37,10 +37,8 @@ static int parse_ofpart_partitions(struct mtd_info *master,
bool dedicated = true;
- if (!data)
- return 0;
-
- mtd_node = data->of_node;
+ /* Pull of_node from the master device node */
+ mtd_node = mtd_get_of_node(master);
if (!mtd_node)
return 0;
@@ -141,7 +139,6 @@ ofpart_none:
}
static struct mtd_part_parser ofpart_parser = {
- .owner = THIS_MODULE,
.parse_fn = parse_ofpart_partitions,
.name = "ofpart",
};
@@ -157,10 +154,8 @@ static int parse_ofoldpart_partitions(struct mtd_info *master,
} *part;
const char *names;
- if (!data)
- return 0;
-
- dp = data->of_node;
+ /* Pull of_node from the master device node */
+ dp = mtd_get_of_node(master);
if (!dp)
return 0;
@@ -203,7 +198,6 @@ static int parse_ofoldpart_partitions(struct mtd_info *master,
}
static struct mtd_part_parser ofoldpart_parser = {
- .owner = THIS_MODULE,
.parse_fn = parse_ofoldpart_partitions,
.name = "ofoldpart",
};