Patchwork Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

login
register
mail settings
Submitter Alexis RODET
Date Nov. 23, 2010, 9:55 a.m.
Message ID <4CEB8F7C.6070102@bvs-tech.com>
Download mbox | patch
Permalink /patch/72641/
State New
Headers show

Comments

Alexis RODET - Nov. 23, 2010, 9:55 a.m.
Hi baruch,

I hope this time every thing is OK.

Le 23/11/2010 10:44, Baruch Siach a écrit :
> Hi Alexis,
> Well, you mailer still breaks lines, e.g.:
>
>> @@ -52,7 +52,7 @@ static struct dsa_platform_data
>> mv88f6281gtw_ge_switch_plat_data = {
> baruch
>
From 2dc4b4dd076c8ba0d9143cb6664e3413a4886850 Mon Sep 17 00:00:00 2001
In-Reply-To: <20101117160514.GA5308@n2100.arm.linux.org.uk>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>
From: Alexis RODET <alexis.rodet@bvs-tech.com>
Date: Thu, 18 Nov 2010 10:34:59 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Alexis RODET <alexis.rodet@bvs-tech.com>

Here is the command line used for doing this:
find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print
I didn't test all compilation as I don't have blackfin compiler installed and I'm quite lasy and also busy.
I compiled for my x86 with allyesconfig and for Freescale mx27 with allyesconfig minus a number of buggy drivers.

---
 arch/arm/mach-at91/board-cam60.c               |    2 +-
 arch/arm/mach-at91/board-ecbat91.c             |    2 +-
 arch/arm/mach-dove/dove-db-setup.c             |    2 +-
 arch/arm/mach-kirkwood/lacie_v2-common.c       |    2 +-
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    2 +-
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    2 +-
 arch/arm/mach-kirkwood/t5325-setup.c           |    2 +-
 arch/arm/mach-kirkwood/tsx1x-common.c          |    2 +-
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    2 +-
 arch/arm/mach-w90x900/dev.c                    |    2 +-
 arch/blackfin/mach-bf518/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf518/boards/tcm-bf518.c    |    2 +-
 arch/blackfin/mach-bf527/boards/ad7160eval.c   |    2 +-
 arch/blackfin/mach-bf527/boards/cm_bf527.c     |    2 +-
 arch/blackfin/mach-bf527/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf527/boards/tll6527m.c     |    2 +-
 arch/blackfin/mach-bf533/boards/H8606.c        |    2 +-
 arch/blackfin/mach-bf533/boards/blackstamp.c   |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c     |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c        |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537e.c    |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537u.c    |    2 +-
 arch/blackfin/mach-bf537/boards/minotaur.c     |    2 +-
 arch/blackfin/mach-bf537/boards/pnav10.c       |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c        |    4 ++--
 arch/blackfin/mach-bf537/boards/tcm_bf537.c    |    2 +-
 arch/blackfin/mach-bf538/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf548/boards/cm_bf548.c     |    2 +-
 arch/blackfin/mach-bf548/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf561/boards/acvilon.c      |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c     |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c  |    2 +-
 drivers/mtd/devices/m25p80.c                   |    2 +-
 drivers/mtd/devices/mtd_dataflash.c            |    2 +-
 drivers/mtd/devices/sst25l.c                   |    2 +-
 drivers/spi/spi_butterfly.c                    |    2 +-
 include/linux/spi/flash.h                      |    4 ++--
 39 files changed, 41 insertions(+), 41 deletions(-)
Grant Likely - Jan. 21, 2011, 7:28 p.m.
On Tue, Nov 23, 2010 at 10:55:08AM +0100, Alexis RODET wrote:
> Hi baruch,
> 
> I hope this time every thing is OK.

Hi Alexis,

Patch doesn't apply.  Looks like it's whitespace damaged (tabs
converted to spaces).  Did you try to cut & paste it?  git send-email
is a more reliable way to post patches.

Also, for a change as far-reaching as this you should do it in two
stages; rename the structure, but leave a #define to the old name so
that conflicts aren't generated in linux-next.  Then remove the
#define after the change makes it into Linus' tree.

> Here is the command line used for doing this:
> find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print

This looks to me like it will miss any files that include
linux/spi/flash.h indirectly (ie, if they include a header that
includes linux/spi/flash.h).  A simple 'git grep flash_platform_data'
could very well be sufficient for finding the call sites.

That being said, is it really worth making this change?  What is your
motivation?  There isn't actually anything spi-specific in the
flash_platform_data structure.

g.


> I didn't test all compilation as I don't have blackfin compiler installed and I'm quite lasy and also busy.
> I compiled for my x86 with allyesconfig and for Freescale mx27 with allyesconfig minus a number of buggy drivers.
> 
> ---
>  arch/arm/mach-at91/board-cam60.c               |    2 +-
>  arch/arm/mach-at91/board-ecbat91.c             |    2 +-
>  arch/arm/mach-dove/dove-db-setup.c             |    2 +-
>  arch/arm/mach-kirkwood/lacie_v2-common.c       |    2 +-
>  arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    2 +-
>  arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    2 +-
>  arch/arm/mach-kirkwood/t5325-setup.c           |    2 +-
>  arch/arm/mach-kirkwood/tsx1x-common.c          |    2 +-
>  arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    2 +-
>  arch/arm/mach-w90x900/dev.c                    |    2 +-
>  arch/blackfin/mach-bf518/boards/ezbrd.c        |    2 +-
>  arch/blackfin/mach-bf518/boards/tcm-bf518.c    |    2 +-
>  arch/blackfin/mach-bf527/boards/ad7160eval.c   |    2 +-
>  arch/blackfin/mach-bf527/boards/cm_bf527.c     |    2 +-
>  arch/blackfin/mach-bf527/boards/ezbrd.c        |    2 +-
>  arch/blackfin/mach-bf527/boards/ezkit.c        |    2 +-
>  arch/blackfin/mach-bf527/boards/tll6527m.c     |    2 +-
>  arch/blackfin/mach-bf533/boards/H8606.c        |    2 +-
>  arch/blackfin/mach-bf533/boards/blackstamp.c   |    2 +-
>  arch/blackfin/mach-bf533/boards/cm_bf533.c     |    2 +-
>  arch/blackfin/mach-bf533/boards/ezkit.c        |    2 +-
>  arch/blackfin/mach-bf533/boards/stamp.c        |    2 +-
>  arch/blackfin/mach-bf537/boards/cm_bf537e.c    |    2 +-
>  arch/blackfin/mach-bf537/boards/cm_bf537u.c    |    2 +-
>  arch/blackfin/mach-bf537/boards/minotaur.c     |    2 +-
>  arch/blackfin/mach-bf537/boards/pnav10.c       |    2 +-
>  arch/blackfin/mach-bf537/boards/stamp.c        |    4 ++--
>  arch/blackfin/mach-bf537/boards/tcm_bf537.c    |    2 +-
>  arch/blackfin/mach-bf538/boards/ezkit.c        |    2 +-
>  arch/blackfin/mach-bf548/boards/cm_bf548.c     |    2 +-
>  arch/blackfin/mach-bf548/boards/ezkit.c        |    2 +-
>  arch/blackfin/mach-bf561/boards/acvilon.c      |    2 +-
>  arch/blackfin/mach-bf561/boards/cm_bf561.c     |    2 +-
>  arch/mips/alchemy/devboards/db1200/platform.c  |    2 +-
>  drivers/mtd/devices/m25p80.c                   |    2 +-
>  drivers/mtd/devices/mtd_dataflash.c            |    2 +-
>  drivers/mtd/devices/sst25l.c                   |    2 +-
>  drivers/spi/spi_butterfly.c                    |    2 +-
>  include/linux/spi/flash.h                      |    4 ++--
>  39 files changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
> index b54e3e6..50780b2 100644
> --- a/arch/arm/mach-at91/board-cam60.c
> +++ b/arch/arm/mach-at91/board-cam60.c
> @@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = {
>      },
>  };
>  
> -static struct flash_platform_data cam60_spi_flash_platform_data = {
> +static struct spi_flash_platform_data cam60_spi_flash_platform_data = {
>      .name        = "spi_flash",
>      .parts        = cam60_spi_partitions,
>      .nr_parts    = ARRAY_SIZE(cam60_spi_partitions)
> diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
> index 7b58c94..8598237 100644
> --- a/arch/arm/mach-at91/board-ecbat91.c
> +++ b/arch/arm/mach-at91/board-ecbat91.c
> @@ -110,7 +110,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] =
>      }
>  };
>  
> -static struct flash_platform_data __initdata my_flash0_platform = {
> +static struct spi_flash_platform_data __initdata my_flash0_platform = {
>      .name        = "Removable flash card",
>      .parts        = my_flash0_partitions,
>      .nr_parts    = ARRAY_SIZE(my_flash0_partitions)
> diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
> index 95925aa..90f8f95 100644
> --- a/arch/arm/mach-dove/dove-db-setup.c
> +++ b/arch/arm/mach-dove/dove-db-setup.c
> @@ -40,7 +40,7 @@ static struct mv_sata_platform_data dove_db_sata_data = {
>   * SPI Devices:
>   *     SPI0: 4M Flash ST-M25P32-VMF6P
>   ****************************************************************************/
> -static const struct flash_platform_data dove_db_spi_flash_data = {
> +static const struct spi_flash_platform_data dove_db_spi_flash_data = {
>      .type        = "m25p64",
>  };
>  
> diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c
> index 285edab..b60003f 100644
> --- a/arch/arm/mach-kirkwood/lacie_v2-common.c
> +++ b/arch/arm/mach-kirkwood/lacie_v2-common.c
> @@ -33,7 +33,7 @@ static struct mtd_partition lacie_v2_flash_parts[] = {
>      },
>  };
>  
> -static const struct flash_platform_data lacie_v2_flash = {
> +static const struct spi_flash_platform_data lacie_v2_flash = {
>      .type        = "mx25l4005a",
>      .name        = "spi_flash",
>      .parts        = lacie_v2_flash_parts,
> diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> index 1e5266f..16356c8 100644
> --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> +++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
> @@ -52,7 +52,7 @@ static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
>      .chip        = &mv88f6281gtw_ge_switch_chip_data,
>  };
>  
> -static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
> +static const struct spi_flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
>      .type        = "mx25l12805d",
>  };
>  
> diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> index 0049614..d3b706f 100644
> --- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
> @@ -32,7 +32,7 @@ static struct mv_sata_platform_data rd88f6192_sata_data = {
>      .n_ports    = 2,
>  };
>  
> -static const struct flash_platform_data rd88F6192_spi_slave_data = {
> +static const struct spi_flash_platform_data rd88F6192_spi_slave_data = {
>      .type        = "m25p128",
>  };
>  
> diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
> index ce50e61..d086983 100644
> --- a/arch/arm/mach-kirkwood/t5325-setup.c
> +++ b/arch/arm/mach-kirkwood/t5325-setup.c
> @@ -59,7 +59,7 @@ struct mtd_partition hp_t5325_partitions[] = {
>      },
>  };
>  
> -const struct flash_platform_data hp_t5325_flash = {
> +const struct spi_flash_platform_data hp_t5325_flash = {
>      .type        = "mx25l8005",
>      .name        = "spi_flash",
>      .parts        = hp_t5325_partitions,
> diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c
> index f781164..14c7825 100644
> --- a/arch/arm/mach-kirkwood/tsx1x-common.c
> +++ b/arch/arm/mach-kirkwood/tsx1x-common.c
> @@ -59,7 +59,7 @@ struct mtd_partition qnap_tsx1x_partitions[] = {
>      },
>  };
>  
> -const struct flash_platform_data qnap_tsx1x_flash = {
> +const struct spi_flash_platform_data qnap_tsx1x_flash = {
>      .type        = "m25p128",
>      .name        = "spi_flash",
>      .parts        = qnap_tsx1x_partitions,
> diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> index 02ff45f..b18bb24 100644
> --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
> @@ -65,7 +65,7 @@ static struct mtd_partition rd88f6183ap_ge_partitions[] = {
>      },
>  };
>  
> -static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
> +static struct spi_flash_platform_data rd88f6183ap_ge_spi_slave_data = {
>      .type        = "m25p64",
>      .nr_parts    = ARRAY_SIZE(rd88f6183ap_ge_partitions),
>      .parts        = rd88f6183ap_ge_partitions,
> diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
> index 7a1fa6a..12d7f7c 100644
> --- a/arch/arm/mach-w90x900/dev.c
> +++ b/arch/arm/mach-w90x900/dev.c
> @@ -246,7 +246,7 @@ static struct mtd_partition nuc900_spi_flash_partitions[] = {
>      },
>  };
>  
> -static struct flash_platform_data nuc900_spi_flash_data = {
> +static struct spi_flash_platform_data nuc900_spi_flash_data = {
>      .name = "m25p80",
>      .parts =  nuc900_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(nuc900_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
> index b894c8a..ded02c1 100644
> --- a/arch/blackfin/mach-bf518/boards/ezbrd.c
> +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
> @@ -178,7 +178,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
> index e6ce1d7..66817b0 100644
> --- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
> +++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
> @@ -128,7 +128,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
> index fc767ac..c43724b 100644
> --- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
> +++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
> @@ -254,7 +254,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
> index 2c31af7..3d5a3dc 100644
> --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
> +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
> @@ -341,7 +341,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
> index 9a736a8..6670939 100644
> --- a/arch/blackfin/mach-bf527/boards/ezbrd.c
> +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
> @@ -240,7 +240,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
> index 9222bc0..78a07e7 100644
> --- a/arch/blackfin/mach-bf527/boards/ezkit.c
> +++ b/arch/blackfin/mach-bf527/boards/ezkit.c
> @@ -434,7 +434,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
> index 9ec5757..147374b 100644
> --- a/arch/blackfin/mach-bf527/boards/tll6527m.c
> +++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
> @@ -304,7 +304,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
> index 2ce7b16..60ff37f 100644
> --- a/arch/blackfin/mach-bf533/boards/H8606.c
> +++ b/arch/blackfin/mach-bf533/boards/H8606.c
> @@ -149,7 +149,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
> index 20c1022..cbdcca1 100644
> --- a/arch/blackfin/mach-bf533/boards/blackstamp.c
> +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
> @@ -93,7 +93,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
> index adbe62a..6448686 100644
> --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
> +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
> @@ -49,7 +49,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
> index a1cb8e7..4e1ee73 100644
> --- a/arch/blackfin/mach-bf533/boards/ezkit.c
> +++ b/arch/blackfin/mach-bf533/boards/ezkit.c
> @@ -200,7 +200,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
> index b3b1cde..8554b38 100644
> --- a/arch/blackfin/mach-bf533/boards/stamp.c
> +++ b/arch/blackfin/mach-bf533/boards/stamp.c
> @@ -163,7 +163,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
> index 836698c..c1bb193 100644
> --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
> +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
> @@ -51,7 +51,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
> index 2a85670..da1886e 100644
> --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
> +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
> @@ -52,7 +52,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
> index 4980051..c360f10 100644
> --- a/arch/blackfin/mach-bf537/boards/minotaur.c
> +++ b/arch/blackfin/mach-bf537/boards/minotaur.c
> @@ -149,7 +149,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
> index b958078..aab7edd 100644
> --- a/arch/blackfin/mach-bf537/boards/pnav10.c
> +++ b/arch/blackfin/mach-bf537/boards/pnav10.c
> @@ -174,7 +174,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
> index 3aa344c..633cbf0 100644
> --- a/arch/blackfin/mach-bf537/boards/stamp.c
> +++ b/arch/blackfin/mach-bf537/boards/stamp.c
> @@ -526,7 +526,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> @@ -1003,7 +1003,7 @@ static struct mtd_partition bfin_spi_dataflash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_dataflash_data = {
> +static struct spi_flash_platform_data bfin_spi_dataflash_data = {
>      .name = "SPI Dataflash",
>      .parts = bfin_spi_dataflash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
> diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
> index 31498ad..557747f 100644
> --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
> +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
> @@ -52,7 +52,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
> index c6fb0a5..de9ab68 100644
> --- a/arch/blackfin/mach-bf538/boards/ezkit.c
> +++ b/arch/blackfin/mach-bf538/boards/ezkit.c
> @@ -493,7 +493,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
> index f0c0eef..7effe25 100644
> --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
> +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
> @@ -849,7 +849,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
> index 216e269..1ab35e3 100644
> --- a/arch/blackfin/mach-bf548/boards/ezkit.c
> +++ b/arch/blackfin/mach-bf548/boards/ezkit.c
> @@ -957,7 +957,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
> index 0b1c20f..7f69032 100644
> --- a/arch/blackfin/mach-bf561/boards/acvilon.c
> +++ b/arch/blackfin/mach-bf561/boards/acvilon.c
> @@ -359,7 +359,7 @@ static struct mtd_partition bfin_spi_dataflash_partitions[] = {
>       }
>  };
>  
> -static struct flash_platform_data bfin_spi_dataflash_data = {
> +static struct spi_flash_platform_data bfin_spi_dataflash_data = {
>      .name = "SPI Dataflash",
>      .parts = bfin_spi_dataflash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
> diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
> index 087b6b0..80073ac 100644
> --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
> +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
> @@ -50,7 +50,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
>      }
>  };
>  
> -static struct flash_platform_data bfin_spi_flash_data = {
> +static struct spi_flash_platform_data bfin_spi_flash_data = {
>      .name = "m25p80",
>      .parts = bfin_spi_flash_partitions,
>      .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
> diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c
> index fbb5593..ea9bf90 100644
> --- a/arch/mips/alchemy/devboards/db1200/platform.c
> +++ b/arch/mips/alchemy/devboards/db1200/platform.c
> @@ -50,7 +50,7 @@ static struct mtd_partition db1200_spiflash_parts[] = {
>      },
>  };
>  
> -static struct flash_platform_data db1200_spiflash_data = {
> +static struct spi_flash_platform_data db1200_spiflash_data = {
>      .name        = "s25fl001",
>      .parts        = db1200_spiflash_parts,
>      .nr_parts    = ARRAY_SIZE(db1200_spiflash_parts),
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index bf5a002..4244468 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -776,7 +776,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
>  static int __devinit m25p_probe(struct spi_device *spi)
>  {
>      const struct spi_device_id    *id = spi_get_device_id(spi);
> -    struct flash_platform_data    *data;
> +    struct spi_flash_platform_data    *data;
>      struct m25p            *flash;
>      struct flash_info        *info;
>      unsigned            i;
> diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
> index c5015cc..9cb2727 100644
> --- a/drivers/mtd/devices/mtd_dataflash.c
> +++ b/drivers/mtd/devices/mtd_dataflash.c
> @@ -634,7 +634,7 @@ add_dataflash_otp(struct spi_device *spi, char *name,
>  {
>      struct dataflash        *priv;
>      struct mtd_info            *device;
> -    struct flash_platform_data    *pdata = spi->dev.platform_data;
> +    struct spi_flash_platform_data    *pdata = spi->dev.platform_data;
>      char                *otp_tag = "";
>      int                err = 0;
>  
> diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
> index 684247a..989758d 100644
> --- a/drivers/mtd/devices/sst25l.c
> +++ b/drivers/mtd/devices/sst25l.c
> @@ -379,7 +379,7 @@ static int __init sst25l_probe(struct spi_device *spi)
>  {
>      struct flash_info *flash_info;
>      struct sst25l_flash *flash;
> -    struct flash_platform_data *data;
> +    struct spi_flash_platform_data *data;
>      int ret, i;
>  
>      flash_info = sst25l_match_device(spi);
> diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
> index 0d4ceba..a9ac6b2 100644
> --- a/drivers/spi/spi_butterfly.c
> +++ b/drivers/spi/spi_butterfly.c
> @@ -183,7 +183,7 @@ static struct mtd_partition partitions[] = { {
>      .size        = MTDPART_SIZ_FULL,
>  } };
>  
> -static struct flash_platform_data flash = {
> +static struct spi_flash_platform_data flash = {
>      .name        = "butterflash",
>      .parts        = partitions,
>      .nr_parts    = ARRAY_SIZE(partitions),
> diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
> index 3f22932..946145e 100644
> --- a/include/linux/spi/flash.h
> +++ b/include/linux/spi/flash.h
> @@ -4,7 +4,7 @@
>  struct mtd_partition;
>  
>  /**
> - * struct flash_platform_data: board-specific flash data
> + * struct spi_flash_platform_data: board-specific flash data
>   * @name: optional flash device name (eg, as used with mtdparts=)
>   * @parts: optional array of mtd_partitions for static partitioning
>   * @nr_parts: number of mtd_partitions for static partitoning
> @@ -18,7 +18,7 @@ struct mtd_partition;
>   * Note that for DataFlash, sizes for pages, blocks, and sectors are
>   * rarely powers of two; and partitions should be sector-aligned.
>   */
> -struct flash_platform_data {
> +struct spi_flash_platform_data {
>      char        *name;
>      struct mtd_partition *parts;
>      unsigned int    nr_parts;
> -- 
> 1.7.1
> 

> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev

> _______________________________________________
> spi-devel-general mailing list
> spi-devel-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Alexis RODET - Jan. 24, 2011, 11:37 a.m.
Hello Grant,

On 21/01/2011 20:28, Grant Likely wrote :
> Hi Alexis,
>
> Patch doesn't apply.  Looks like it's whitespace damaged (tabs
> converted to spaces).  Did you try to cut & paste it?  git send-email
> is a more reliable way to post patches.
Yes I did, sorry I hadn't installed git-send-email.
OK I'll do this way.
Get my patch in next e-mail.
> Also, for a change as far-reaching as this you should do it in two
> stages; rename the structure, but leave a #define to the old name so
> that conflicts aren't generated in linux-next.  Then remove the
> #define after the change makes it into Linus' tree.
And I keep changing all source code that use this structure, don't I ?
>> Here is the command line used for doing this:
>> find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print
> This looks to me like it will miss any files that include
> linux/spi/flash.h indirectly (ie, if they include a header that
> includes linux/spi/flash.h).  A simple 'git grep flash_platform_data'
> could very well be sufficient for finding the call sites.
Yes, I knew this might be a problem.
I checked this and this doesn't happen:
There is no ".h" file that include linux/spi/flash.h so their can't be indirect use.
I checked also any ".h" file that have 'struct flash_platform_data' and I found:
./arch/arm/mach-ixp2000/include/mach/platform.h
./arch/arm/mach-sa1100/generic.h
./arch/arm/include/asm/mach/flash.h
that are all related in source code to the last one.

After my patch, the only files that have struct flash_platform_data without #include <asm/mach/flash.h> are the 3 .h files above and ./drivers/mtd/onenand/generic.c inside a comment:
29: * with the name "onenand" used to take struct flash_platform_data.

> That being said, is it really worth making this change?  What is your
> motivation?  There isn't actually anything spi-specific in the
> flash_platform_data structure.
The main problem is there are 2 different struct flash_platform_data
1 in include/linux/spi/flash.h for SPI flash devices that work with SPI API (also through MTD).
1 in arm/include/asm/mach/flash.h for other mtd flash devices (NOR, NAND...) that work with MTD API.

The one in SPI is more recent and less used in source code, so this one should not have got the same name and the work is easier.

My motivation is I have a machine with both SPI and NOR/NAND that need both structures and ".h" files conflicts.

Alexis
Alexis RODET - Jan. 24, 2011, 3:49 p.m.
Hi again,

In facts I don't know which git URL to clone for getting linux-next as patch base, can you tell me ?
I'm working on last stable release from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git.

I wonder also what to do if people keep committing new files with old structure name:
What should I put to make the define generate a "deprecated" warning ?

BR,
Alexis

On 24/01/2011 12:37, Alexis RODET wrote :
>> Also, for a change as far-reaching as this you should do it in two
>> stages; rename the structure, but leave a #define to the old name so
>> that conflicts aren't generated in linux-next.  Then remove the
>> #define after the change makes it into Linus' tree.
> And I keep changing all source code that use this structure, don't I ?
Grant Likely - Jan. 24, 2011, 5:52 p.m.
On Mon, Jan 24, 2011 at 8:49 AM, Alexis RODET <alexis.rodet@bvs-tech.com> wrote:
> Hi again,
>
> In facts I don't know which git URL to clone for getting linux-next as patch base, can you tell me ?
> I'm working on last stable release from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git.

git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

Be warned, it is rebased every night.

> I wonder also what to do if people keep committing new files with old structure name:
> What should I put to make the define generate a "deprecated" warning ?

The spi flash_platform_data structure is almost a complete subset of
the arm one.  Rather than renaming everything, why not simply
consolidate the structure definition?  Consolidating will have much
lower impact.

g.
Alexis RODET - Jan. 25, 2011, 9:23 a.m.
Le 24/01/2011 18:52, Grant Likely a écrit :
>
> The spi flash_platform_data structure is almost a complete subset of
> the arm one.  Rather than renaming everything, why not simply
> consolidate the structure definition?  Consolidating will have much
> lower impact.
Then I should create a common flash.h file, let's tell include/linux/mtd/flash.h, and make both existing flash.h file point to it.
This is actually an easy work.
I'll do this.

BR,
Alexis
Alexis RODET - Jan. 25, 2011, 9:40 a.m.
Hello,

Le 24/01/2011 18:52, Grant Likely a écrit :
> On Mon, Jan 24, 2011 at 8:49 AM, Alexis RODET <alexis.rodet@bvs-tech.com> wrote:
>> Hi again,
>>
>> In facts I don't know which git URL to clone for getting linux-next as patch base, can you tell me ?
>> I'm working on last stable release from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git.
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>
> Be warned, it is rebased every night.
>
It seems to have been frozen for 4 days and to have become late behind git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Alexis
Josh Boyer - Jan. 26, 2011, 2:35 p.m.
On Tue, Jan 25, 2011 at 4:40 AM, Alexis RODET <alexis.rodet@bvs-tech.com> wrote:
> Hello,
>
> Le 24/01/2011 18:52, Grant Likely a écrit :
>> On Mon, Jan 24, 2011 at 8:49 AM, Alexis RODET <alexis.rodet@bvs-tech.com> wrote:
>>> Hi again,
>>>
>>> In facts I don't know which git URL to clone for getting linux-next as patch base, can you tell me ?
>>> I'm working on last stable release from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git.
>> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>
>> Be warned, it is rebased every night.
>>
> It seems to have been frozen for 4 days and to have become late behind git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Stephen said something elsewhere about not generating a new one until
Jan 31.  I would suspect this has to do with LCA going on right now.

josh

Patch

diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -98,7 +98,7 @@  static struct mtd_partition cam60_spi_partitions[] = {
     },
 };
 
-static struct flash_platform_data cam60_spi_flash_platform_data = {
+static struct spi_flash_platform_data cam60_spi_flash_platform_data = {
     .name        = "spi_flash",
     .parts        = cam60_spi_partitions,
     .nr_parts    = ARRAY_SIZE(cam60_spi_partitions)
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -110,7 +110,7 @@  static struct mtd_partition __initdata my_flash0_partitions[] =
     }
 };
 
-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {
     .name        = "Removable flash card",
     .parts        = my_flash0_partitions,
     .nr_parts    = ARRAY_SIZE(my_flash0_partitions)
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -40,7 +40,7 @@  static struct mv_sata_platform_data dove_db_sata_data = {
  * SPI Devices:
  *     SPI0: 4M Flash ST-M25P32-VMF6P
  ****************************************************************************/
-static const struct flash_platform_data dove_db_spi_flash_data = {
+static const struct spi_flash_platform_data dove_db_spi_flash_data = {
     .type        = "m25p64",
 };
 
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644
--- a/arch/arm/mach-kirkwood/lacie_v2-common.c
+++ b/arch/arm/mach-kirkwood/lacie_v2-common.c
@@ -33,7 +33,7 @@  static struct mtd_partition lacie_v2_flash_parts[] = {
     },
 };
 
-static const struct flash_platform_data lacie_v2_flash = {
+static const struct spi_flash_platform_data lacie_v2_flash = {
     .type        = "mx25l4005a",
     .name        = "spi_flash",
     .parts        = lacie_v2_flash_parts,
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -52,7 +52,7 @@  static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
     .chip        = &mv88f6281gtw_ge_switch_chip_data,
 };
 
-static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
+static const struct spi_flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
     .type        = "mx25l12805d",
 };
 
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -32,7 +32,7 @@  static struct mv_sata_platform_data rd88f6192_sata_data = {
     .n_ports    = 2,
 };
 
-static const struct flash_platform_data rd88F6192_spi_slave_data = {
+static const struct spi_flash_platform_data rd88F6192_spi_slave_data = {
     .type        = "m25p128",
 };
 
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -59,7 +59,7 @@  struct mtd_partition hp_t5325_partitions[] = {
     },
 };
 
-const struct flash_platform_data hp_t5325_flash = {
+const struct spi_flash_platform_data hp_t5325_flash = {
     .type        = "mx25l8005",
     .name        = "spi_flash",
     .parts        = hp_t5325_partitions,
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644
--- a/arch/arm/mach-kirkwood/tsx1x-common.c
+++ b/arch/arm/mach-kirkwood/tsx1x-common.c
@@ -59,7 +59,7 @@  struct mtd_partition qnap_tsx1x_partitions[] = {
     },
 };
 
-const struct flash_platform_data qnap_tsx1x_flash = {
+const struct spi_flash_platform_data qnap_tsx1x_flash = {
     .type        = "m25p128",
     .name        = "spi_flash",
     .parts        = qnap_tsx1x_partitions,
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -65,7 +65,7 @@  static struct mtd_partition rd88f6183ap_ge_partitions[] = {
     },
 };
 
-static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
+static struct spi_flash_platform_data rd88f6183ap_ge_spi_slave_data = {
     .type        = "m25p64",
     .nr_parts    = ARRAY_SIZE(rd88f6183ap_ge_partitions),
     .parts        = rd88f6183ap_ge_partitions,
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 7a1fa6a..12d7f7c 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -246,7 +246,7 @@  static struct mtd_partition nuc900_spi_flash_partitions[] = {
     },
 };
 
-static struct flash_platform_data nuc900_spi_flash_data = {
+static struct spi_flash_platform_data nuc900_spi_flash_data = {
     .name = "m25p80",
     .parts =  nuc900_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(nuc900_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -178,7 +178,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -128,7 +128,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -254,7 +254,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -341,7 +341,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -240,7 +240,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -434,7 +434,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -304,7 +304,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -149,7 +149,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -93,7 +93,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -49,7 +49,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -200,7 +200,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -163,7 +163,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -51,7 +51,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -52,7 +52,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -149,7 +149,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -174,7 +174,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -526,7 +526,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
@@ -1003,7 +1003,7 @@  static struct mtd_partition bfin_spi_dataflash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -52,7 +52,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -493,7 +493,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -849,7 +849,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -957,7 +957,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -359,7 +359,7 @@  static struct mtd_partition bfin_spi_dataflash_partitions[] = {
      }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -50,7 +50,7 @@  static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -50,7 +50,7 @@  static struct mtd_partition db1200_spiflash_parts[] = {
     },
 };
 
-static struct flash_platform_data db1200_spiflash_data = {
+static struct spi_flash_platform_data db1200_spiflash_data = {
     .name        = "s25fl001",
     .parts        = db1200_spiflash_parts,
     .nr_parts    = ARRAY_SIZE(db1200_spiflash_parts),
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index bf5a002..4244468 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -776,7 +776,7 @@  static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
 static int __devinit m25p_probe(struct spi_device *spi)
 {
     const struct spi_device_id    *id = spi_get_device_id(spi);
-    struct flash_platform_data    *data;
+    struct spi_flash_platform_data    *data;
     struct m25p            *flash;
     struct flash_info        *info;
     unsigned            i;
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -634,7 +634,7 @@  add_dataflash_otp(struct spi_device *spi, char *name,
 {
     struct dataflash        *priv;
     struct mtd_info            *device;
-    struct flash_platform_data    *pdata = spi->dev.platform_data;
+    struct spi_flash_platform_data    *pdata = spi->dev.platform_data;
     char                *otp_tag = "";
     int                err = 0;
 
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..989758d 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -379,7 +379,7 @@  static int __init sst25l_probe(struct spi_device *spi)
 {
     struct flash_info *flash_info;
     struct sst25l_flash *flash;
-    struct flash_platform_data *data;
+    struct spi_flash_platform_data *data;
     int ret, i;
 
     flash_info = sst25l_match_device(spi);
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index 0d4ceba..a9ac6b2 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -183,7 +183,7 @@  static struct mtd_partition partitions[] = { {
     .size        = MTDPART_SIZ_FULL,
 } };
 
-static struct flash_platform_data flash = {
+static struct spi_flash_platform_data flash = {
     .name        = "butterflash",
     .parts        = partitions,
     .nr_parts    = ARRAY_SIZE(partitions),
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
index 3f22932..946145e 100644
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -4,7 +4,7 @@ 
 struct mtd_partition;
 
 /**
- * struct flash_platform_data: board-specific flash data
+ * struct spi_flash_platform_data: board-specific flash data
  * @name: optional flash device name (eg, as used with mtdparts=)
  * @parts: optional array of mtd_partitions for static partitioning
  * @nr_parts: number of mtd_partitions for static partitoning
@@ -18,7 +18,7 @@  struct mtd_partition;
  * Note that for DataFlash, sizes for pages, blocks, and sectors are
  * rarely powers of two; and partitions should be sector-aligned.
  */
-struct flash_platform_data {
+struct spi_flash_platform_data {
     char        *name;
     struct mtd_partition *parts;
     unsigned int    nr_parts;