Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153769
b: refs/heads/master
c: b90cf66
h: refs/heads/master
i:
  153767: 9b6acd5
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed May 26, 2009
1 parent 6ecb3a5 commit 0727fe8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4704a78472cd5c58f6b4c4f8c04d32de2da3f20a
refs/heads/master: b90cf6681f4f6263920616e7ca2fd09130e4143a
18 changes: 4 additions & 14 deletions trunk/drivers/mtd/mtdpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ struct mtd_part {
struct mtd_info mtd;
struct mtd_info *master;
uint64_t offset;
int index;
struct list_head list;
int registered;
};

/*
Expand Down Expand Up @@ -321,8 +319,7 @@ int del_mtd_partitions(struct mtd_info *master)
list_for_each_entry_safe(slave, next, &mtd_partitions, list)
if (slave->master == master) {
list_del(&slave->list);
if (slave->registered)
del_mtd_device(&slave->mtd);
del_mtd_device(&slave->mtd);
kfree(slave);
}

Expand Down Expand Up @@ -412,7 +409,6 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
slave->mtd.erase = part_erase;
slave->master = master;
slave->offset = part->offset;
slave->index = partno;

if (slave->offset == MTDPART_OFS_APPEND)
slave->offset = cur_offset;
Expand Down Expand Up @@ -500,15 +496,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
}

out_register:
if (part->mtdp) {
/* store the object pointer (caller may or may not register it*/
*part->mtdp = &slave->mtd;
slave->registered = 0;
} else {
/* register our partition */
add_mtd_device(&slave->mtd);
slave->registered = 1;
}
/* register our partition */
add_mtd_device(&slave->mtd);

return slave;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/mtd/partitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ struct mtd_partition {
uint64_t offset; /* offset within the master MTD space */
uint32_t mask_flags; /* master MTD flags to mask out for this partition */
struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
struct mtd_info **mtdp; /* pointer to store the MTD object */
};

#define MTDPART_OFS_NXTBLK (-2)
Expand Down

0 comments on commit 0727fe8

Please sign in to comment.