From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Devel error: redefinition of 'struct flash_platform_data'
Date: Wed, 17 Nov 2010 16:05:14 +0000 [thread overview]
Message-ID: <20101117160514.GA5308@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4CE3F756.6040700@bvs-tech.com>
On Wed, Nov 17, 2010 at 04:40:06PM +0100, Alexis RODET wrote:
> Hello,
>
> I'm making an arm machine with both mtd flash and m25p spi flash and try
> to define partitions for both chips in my code.
>
> But there are 2 definitions of 'struct flash_platform_data' and both
> definition are incompatible:
>
> in <asm/mach/flash.h>:
> struct flash_platform_data {
> const char *map_name;
> const char *name;
> unsigned int width;
> int (*init)(void);
> void (*exit)(void);
> void (*set_vpp)(int on);
> void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
> struct mtd_partition *parts;
> unsigned int nr_parts;
> };
>
> in <linux/spi/flash.h>:
> struct flash_platform_data {
> char *name;
> struct mtd_partition *parts;
> unsigned int nr_parts;
>
> char *type;
>
> /* we'll likely add more ... use JEDEC IDs, etc */
> };
>
> Both are included in a lot of machines or driver.
>
> I don't know what to do.
Shoot the person who decided to duplicate the structure, rather than
renaming the header file.
I think this issue is one which keeps turning up, but no one ever does
anything about it... I think therefore it's a lost cause. Maybe the
SPI folk just don't give a damn about it... I've no idea.
It would, however, be nice if _someone_ out there could produce a patch
for it...
next prev parent reply other threads:[~2010-11-17 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 15:40 Devel error: redefinition of 'struct flash_platform_data' Alexis RODET
2010-11-17 16:05 ` Russell King - ARM Linux [this message]
2010-11-19 17:23 ` [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h Alexis RODET
2010-11-21 4:47 ` Baruch Siach
2010-11-22 9:58 ` Alexis RODET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101117160514.GA5308@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).