diff options
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r-- | drivers/mtd/mtdpart.c | 91 |
1 files changed, 46 insertions, 45 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 47d00f0bb36d..4f01079e357f 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c | |||
@@ -262,7 +262,7 @@ static int part_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
262 | 262 | ||
263 | void mtd_erase_callback(struct erase_info *instr) | 263 | void mtd_erase_callback(struct erase_info *instr) |
264 | { | 264 | { |
265 | if (instr->mtd->erase == part_erase) { | 265 | if (instr->mtd->_erase == part_erase) { |
266 | struct mtd_part *part = PART(instr->mtd); | 266 | struct mtd_part *part = PART(instr->mtd); |
267 | 267 | ||
268 | if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) | 268 | if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) |
@@ -410,54 +410,55 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, | |||
410 | */ | 410 | */ |
411 | slave->mtd.dev.parent = master->dev.parent; | 411 | slave->mtd.dev.parent = master->dev.parent; |
412 | 412 | ||
413 | slave->mtd.read = part_read; | 413 | slave->mtd._read = part_read; |
414 | slave->mtd.write = part_write; | 414 | slave->mtd._write = part_write; |
415 | 415 | ||
416 | if (master->panic_write) | 416 | if (master->_panic_write) |
417 | slave->mtd.panic_write = part_panic_write; | 417 | slave->mtd._panic_write = part_panic_write; |
418 | 418 | ||
419 | if (master->point && master->unpoint) { | 419 | if (master->_point && master->_unpoint) { |
420 | slave->mtd.point = part_point; | 420 | slave->mtd._point = part_point; |
421 | slave->mtd.unpoint = part_unpoint; | 421 | slave->mtd._unpoint = part_unpoint; |
422 | } | 422 | } |
423 | 423 | ||
424 | if (master->get_unmapped_area) | 424 | if (master->_get_unmapped_area) |
425 | slave->mtd.get_unmapped_area = part_get_unmapped_area; | 425 | slave->mtd._get_unmapped_area = part_get_unmapped_area; |
426 | if (master->read_oob) | 426 | if (master->_read_oob) |
427 | slave->mtd.read_oob = part_read_oob; | 427 | slave->mtd._read_oob = part_read_oob; |
428 | if (master->write_oob) | 428 | if (master->_write_oob) |
429 | slave->mtd.write_oob = part_write_oob; | 429 | slave->mtd._write_oob = part_write_oob; |
430 | if (master->read_user_prot_reg) | 430 | if (master->_read_user_prot_reg) |
431 | slave->mtd.read_user_prot_reg = part_read_user_prot_reg; | 431 | slave->mtd._read_user_prot_reg = part_read_user_prot_reg; |
432 | if (master->read_fact_prot_reg) | 432 | if (master->_read_fact_prot_reg) |
433 | slave->mtd.read_fact_prot_reg = part_read_fact_prot_reg; | 433 | slave->mtd._read_fact_prot_reg = part_read_fact_prot_reg; |
434 | if (master->write_user_prot_reg) | 434 | if (master->_write_user_prot_reg) |
435 | slave->mtd.write_user_prot_reg = part_write_user_prot_reg; | 435 | slave->mtd._write_user_prot_reg = part_write_user_prot_reg; |
436 | if (master->lock_user_prot_reg) | 436 | if (master->_lock_user_prot_reg) |
437 | slave->mtd.lock_user_prot_reg = part_lock_user_prot_reg; | 437 | slave->mtd._lock_user_prot_reg = part_lock_user_prot_reg; |
438 | if (master->get_user_prot_info) | 438 | if (master->_get_user_prot_info) |
439 | slave->mtd.get_user_prot_info = part_get_user_prot_info; | 439 | slave->mtd._get_user_prot_info = part_get_user_prot_info; |
440 | if (master->get_fact_prot_info) | 440 | if (master->_get_fact_prot_info) |
441 | slave->mtd.get_fact_prot_info = part_get_fact_prot_info; | 441 | slave->mtd._get_fact_prot_info = part_get_fact_prot_info; |
442 | if (master->sync) | 442 | if (master->_sync) |
443 | slave->mtd.sync = part_sync; | 443 | slave->mtd._sync = part_sync; |
444 | if (!partno && !master->dev.class && master->suspend && master->resume) { | 444 | if (!partno && !master->dev.class && master->_suspend && |
445 | slave->mtd.suspend = part_suspend; | 445 | master->_resume) { |
446 | slave->mtd.resume = part_resume; | 446 | slave->mtd._suspend = part_suspend; |
447 | slave->mtd._resume = part_resume; | ||
447 | } | 448 | } |
448 | if (master->writev) | 449 | if (master->_writev) |
449 | slave->mtd.writev = part_writev; | 450 | slave->mtd._writev = part_writev; |
450 | if (master->lock) | 451 | if (master->_lock) |
451 | slave->mtd.lock = part_lock; | 452 | slave->mtd._lock = part_lock; |
452 | if (master->unlock) | 453 | if (master->_unlock) |
453 | slave->mtd.unlock = part_unlock; | 454 | slave->mtd._unlock = part_unlock; |
454 | if (master->is_locked) | 455 | if (master->_is_locked) |
455 | slave->mtd.is_locked = part_is_locked; | 456 | slave->mtd._is_locked = part_is_locked; |
456 | if (master->block_isbad) | 457 | if (master->_block_isbad) |
457 | slave->mtd.block_isbad = part_block_isbad; | 458 | slave->mtd._block_isbad = part_block_isbad; |
458 | if (master->block_markbad) | 459 | if (master->_block_markbad) |
459 | slave->mtd.block_markbad = part_block_markbad; | 460 | slave->mtd._block_markbad = part_block_markbad; |
460 | slave->mtd.erase = part_erase; | 461 | slave->mtd._erase = part_erase; |
461 | slave->master = master; | 462 | slave->master = master; |
462 | slave->offset = part->offset; | 463 | slave->offset = part->offset; |
463 | 464 | ||
@@ -549,7 +550,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, | |||
549 | } | 550 | } |
550 | 551 | ||
551 | slave->mtd.ecclayout = master->ecclayout; | 552 | slave->mtd.ecclayout = master->ecclayout; |
552 | if (master->block_isbad) { | 553 | if (master->_block_isbad) { |
553 | uint64_t offs = 0; | 554 | uint64_t offs = 0; |
554 | 555 | ||
555 | while (offs < slave->mtd.size) { | 556 | while (offs < slave->mtd.size) { |