Skip to content

Commit

Permalink
mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name
Browse files Browse the repository at this point in the history
Commit d68cbdd (mtd: physmap_of: allow to specify the mtd name for retro
compatiblity) broke cmdline partitioning using dev_name() in the kernel command
line.  of_property_read_string() does not touch mtd_name when linux,mtd-name is
not present in the device tree, which causes map.name to be set to a random
value.  Fix this by initializing mtd_name to NULL.

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Baruch Siach authored and David Woodhouse committed Jan 19, 2013
1 parent bf65aaa commit 7dfe4be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev)
resource_size_t res_size;
struct mtd_part_parser_data ppdata;
bool map_indirect;
const char *mtd_name;
const char *mtd_name = NULL;

match = of_match_device(of_flash_match, &dev->dev);
if (!match)
Expand Down

0 comments on commit 7dfe4be

Please sign in to comment.