mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
0ddae04c22
Should fix parser data containing uninitialized values for of probed physmap flashes, which could break e.g. the redboot parser. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
27 lines
820 B
Diff
27 lines
820 B
Diff
From c7c3c338cb25d7f55ddb3f6bfbf3572758ca3896 Mon Sep 17 00:00:00 2001
|
|
From: Jonas Gorski <jonas.gorski@gmail.com>
|
|
Date: Thu, 10 Nov 2011 16:53:08 +0100
|
|
Subject: [PATCH 50/79] MTD: DEVICES: m25p80: use parsers if provided in flash
|
|
platform data
|
|
|
|
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
|
---
|
|
drivers/mtd/devices/m25p80.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/mtd/devices/m25p80.c
|
|
+++ b/drivers/mtd/devices/m25p80.c
|
|
@@ -248,8 +248,10 @@ static int m25p_probe(struct spi_device
|
|
if (ret)
|
|
return ret;
|
|
|
|
- return mtd_device_register(&nor->mtd, data ? data->parts : NULL,
|
|
- data ? data->nr_parts : 0);
|
|
+ return mtd_device_parse_register(&nor->mtd,
|
|
+ data ? data->part_probe_types : NULL, NULL,
|
|
+ data ? data->parts : NULL,
|
|
+ data ? data->nr_parts : 0);
|
|
}
|
|
|
|
|