aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 144e6b613a77..06d5b9d8853a 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -84,6 +84,18 @@ static void part_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
84 part->master->unpoint(part->master, from + part->offset, len); 84 part->master->unpoint(part->master, from + part->offset, len);
85} 85}
86 86
87static unsigned long part_get_unmapped_area(struct mtd_info *mtd,
88 unsigned long len,
89 unsigned long offset,
90 unsigned long flags)
91{
92 struct mtd_part *part = PART(mtd);
93
94 offset += part->offset;
95 return part->master->get_unmapped_area(part->master, len, offset,
96 flags);
97}
98
87static int part_read_oob(struct mtd_info *mtd, loff_t from, 99static int part_read_oob(struct mtd_info *mtd, loff_t from,
88 struct mtd_oob_ops *ops) 100 struct mtd_oob_ops *ops)
89{ 101{
@@ -342,6 +354,7 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
342 354
343 slave->mtd.name = part->name; 355 slave->mtd.name = part->name;
344 slave->mtd.owner = master->owner; 356 slave->mtd.owner = master->owner;
357 slave->mtd.backing_dev_info = master->backing_dev_info;
345 358
346 slave->mtd.read = part_read; 359 slave->mtd.read = part_read;
347 slave->mtd.write = part_write; 360 slave->mtd.write = part_write;
@@ -354,6 +367,8 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
354 slave->mtd.unpoint = part_unpoint; 367 slave->mtd.unpoint = part_unpoint;
355 } 368 }
356 369
370 if (master->get_unmapped_area)
371 slave->mtd.get_unmapped_area = part_get_unmapped_area;
357 if (master->read_oob) 372 if (master->read_oob)
358 slave->mtd.read_oob = part_read_oob; 373 slave->mtd.read_oob = part_read_oob;
359 if (master->write_oob) 374 if (master->write_oob)