Patchwork mtd: ixp4xx: fix partition parser argument

login
register
mail settings
Submitter Michał Wróbel
Date March 26, 2012, 1:37 p.m.
Message ID <20120326133735.GA19800@FLYC077.flytronic.local>
Download mbox | patch
Permalink /patch/148743/
State New
Headers show

Comments

Michał Wróbel - March 26, 2012, 1:37 p.m.
Commit c7975330154af17aecc167b33ca866b6b3d98918 ("mtd: abstract last MTD
partition parser argument") moved the "origin" argument into struct
mtd_part_parser_data, but didn't update its only user: ixp4xx.c.

Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
---
 drivers/mtd/maps/ixp4xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Artem Bityutskiy - March 26, 2012, 2:38 p.m.
On Mon, 2012-03-26 at 15:37 +0200, Michał Wróbel wrote:
> Commit c7975330154af17aecc167b33ca866b6b3d98918 ("mtd: abstract last MTD
> partition parser argument") moved the "origin" argument into struct
> mtd_part_parser_data, but didn't update its only user: ixp4xx.c.
> 
> Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> Cc: Artem Bityutskiy <dedekind1@gmail.com>
> ---
>  drivers/mtd/maps/ixp4xx.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

Thanks, but we already have a fix scheduled in the l2-mtd.git tree:

http://git.infradead.org/users/dedekind/l2-mtd.git/commit/87cd5901e82658b49357f41d27b0acbe454b1a3f
Michał Wróbel - March 26, 2012, 3:06 p.m.
On 26.03.2012 16:38, Artem Bityutskiy wrote:
> On Mon, 2012-03-26 at 15:37 +0200, Michał Wróbel wrote:
>> Commit c7975330154af17aecc167b33ca866b6b3d98918 ("mtd: abstract last MTD
>> partition parser argument") moved the "origin" argument into struct
>> mtd_part_parser_data, but didn't update its only user: ixp4xx.c.
>>
>> Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
>> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
>> Cc: Artem Bityutskiy <dedekind1@gmail.com>
>> ---
>>  drivers/mtd/maps/ixp4xx.c |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
> Thanks, but we already have a fix scheduled in the l2-mtd.git tree:
>
> http://git.infradead.org/users/dedekind/l2-mtd.git/commit/87cd5901e82658b49357f41d27b0acbe454b1a3f
Oh, that's right. I should have searched for an existing solution before
finding it on my own.

Patch

diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
index 8b54101..8d6ca57 100644
--- a/drivers/mtd/maps/ixp4xx.c
+++ b/drivers/mtd/maps/ixp4xx.c
@@ -183,6 +183,7 @@  static int ixp4xx_flash_probe(struct platform_device *dev)
 	struct flash_platform_data *plat = dev->dev.platform_data;
 	struct ixp4xx_flash_info *info;
 	int err = -1;
+	struct mtd_part_parser_data ppdata;
 
 	if (!plat)
 		return -ENODEV;
@@ -247,7 +248,8 @@  static int ixp4xx_flash_probe(struct platform_device *dev)
 	/* Use the fast version */
 	info->map.write = ixp4xx_write16;
 
-	err = mtd_device_parse_register(info->mtd, probes, dev->resource->start,
+	ppdata.origin = dev->resource->start;
+	err = mtd_device_parse_register(info->mtd, probes, &ppdata,
 			plat->parts, plat->nr_parts);
 	if (err) {
 		printk(KERN_ERR "Could not parse partitions\n");