Skip to content

Commit

Permalink
mtd: ofpart: Replicate mtd cmdline "lk" option with device tree "lock…
Browse files Browse the repository at this point in the history
…" property

The mtd partition command line parser already supports a "lk" option to mask
MTD_POWERUP_LOCK. This extends that same functionality to device tree
partition specifications.

Signed-off-by: Josh Radel <jradel@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Josh Radel authored and Artem Bityutskiy committed Nov 22, 2012
1 parent 9b7ef60 commit ab0b00b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mtd/ofpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ static int parse_ofpart_partitions(struct mtd_info *master,
(*pparts)[i].name = (char *)partname;

if (of_get_property(pp, "read-only", &len))
(*pparts)[i].mask_flags = MTD_WRITEABLE;
(*pparts)[i].mask_flags |= MTD_WRITEABLE;

if (of_get_property(pp, "lock", &len))
(*pparts)[i].mask_flags |= MTD_POWERUP_LOCK;

i++;
}
Expand Down

0 comments on commit ab0b00b

Please sign in to comment.