diff options
author | Marc Kleine-Budde <mkl@blackshift.org> | 2012-02-08 14:24:29 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:33:33 -0400 |
commit | a3c1e3b732b3708a80e4035b9d845f3f7c7dd0c9 (patch) | |
tree | 69a9062178170e7ae2e9f92cb28dca19c0e5100c /drivers/mtd/maps/ixp4xx.c | |
parent | de3cac9357b5aa9f9f02520e5f2567b06f3f75a7 (diff) |
mtd: ixp4xx: oops in ixp4xx_flash_probe
In commit "c797533 mtd: abstract last MTD partition parser argument" the
third argument of "mtd_device_parse_register()" changed from start address
of the MTD device to a pointer to a struct.
The "ixp4xx_flash_probe()" function was not converted properly, causing
an oops during boot.
This patch fixes the problem by filling the needed information into a
"struct mtd_part_parser_data" and passing it to
"mtd_device_parse_register()".
Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [3.2+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/ixp4xx.c')
-rw-r--r-- | drivers/mtd/maps/ixp4xx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 8b5410162d70..e864fc6c58f9 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -182,6 +182,9 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
182 | { | 182 | { |
183 | struct flash_platform_data *plat = dev->dev.platform_data; | 183 | struct flash_platform_data *plat = dev->dev.platform_data; |
184 | struct ixp4xx_flash_info *info; | 184 | struct ixp4xx_flash_info *info; |
185 | struct mtd_part_parser_data ppdata = { | ||
186 | .origin = dev->resource->start, | ||
187 | }; | ||
185 | int err = -1; | 188 | int err = -1; |
186 | 189 | ||
187 | if (!plat) | 190 | if (!plat) |
@@ -247,7 +250,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
247 | /* Use the fast version */ | 250 | /* Use the fast version */ |
248 | info->map.write = ixp4xx_write16; | 251 | info->map.write = ixp4xx_write16; |
249 | 252 | ||
250 | err = mtd_device_parse_register(info->mtd, probes, dev->resource->start, | 253 | err = mtd_device_parse_register(info->mtd, probes, &ppdata, |
251 | plat->parts, plat->nr_parts); | 254 | plat->parts, plat->nr_parts); |
252 | if (err) { | 255 | if (err) { |
253 | printk(KERN_ERR "Could not parse partitions\n"); | 256 | printk(KERN_ERR "Could not parse partitions\n"); |