diff options
author | Baruch Siach <baruch@tkos.co.il> | 2012-12-23 06:10:50 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-01-19 04:53:45 -0500 |
commit | 7dfe4be351e81656ca1068e5d4ead235c7ba94b1 (patch) | |
tree | 51132c9ee6056306f3c00e4991be325ee8066c9a /drivers/mtd | |
parent | bf65aaa637cabae0386fe46b1ad5cd16997474f5 (diff) |
mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name
Commit d68cbdd4fb (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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 37cdc201652f..6fb2bd83d7de 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev) | |||
170 | resource_size_t res_size; | 170 | resource_size_t res_size; |
171 | struct mtd_part_parser_data ppdata; | 171 | struct mtd_part_parser_data ppdata; |
172 | bool map_indirect; | 172 | bool map_indirect; |
173 | const char *mtd_name; | 173 | const char *mtd_name = NULL; |
174 | 174 | ||
175 | match = of_match_device(of_flash_match, &dev->dev); | 175 | match = of_match_device(of_flash_match, &dev->dev); |
176 | if (!match) | 176 | if (!match) |