Skip to contentSkip to conversation

Devel error: redefinition of 'struct flash_platform_data'

PATCH New Alexis RODET 7 participants 27 messages Nov 17, 2010 – Jul 10, 2011 1 message not in the archive

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

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.
Which one should I jeopardize or rename ?

Thank for your help,
Alexis RODET
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexis_rodet.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101117/80bb9b43/attachment-0001.vcf>

#1 lore raw
Quoted 32 lines · Alexis RODET

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 */
};
Quoted 3 lines

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...

#2 lore raw

PATCH 1/1 Renaming 'struct flash_platform_data' into 'struct

spi_flash_platform_data' in include/linux/spi/flash.h
To: linux-arm-kernel at lists.infradead.org

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(-)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644

arch/arm/mach-at91/board-cam60.c +1 -1
@@ -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)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644

arch/arm/mach-at91/board-ecbat91.c +0 -0
@@ -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)

(quoted diff) +0 -0

b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644

arch/arm/mach-dove/dove-db-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644

arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644

arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644

arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644

arch/arm/mach-kirkwood/t5325-setup.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644

arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644

arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +0 -0
@@ -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,
arch/arm/mach-w90x900/dev.c +0 -0
index 7a1fa6a..12d7f7c 100644
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644

arch/blackfin/mach-bf518/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644

arch/blackfin/mach-bf518/boards/tcm-bf518.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644

arch/blackfin/mach-bf527/boards/ad7160eval.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644

arch/blackfin/mach-bf527/boards/cm_bf527.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644

arch/blackfin/mach-bf527/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644

arch/blackfin/mach-bf527/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644

arch/blackfin/mach-bf527/boards/tll6527m.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644

arch/blackfin/mach-bf533/boards/H8606.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644

arch/blackfin/mach-bf533/boards/blackstamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644

arch/blackfin/mach-bf533/boards/cm_bf533.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644

arch/blackfin/mach-bf533/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644

arch/blackfin/mach-bf533/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644

arch/blackfin/mach-bf537/boards/cm_bf537e.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644

arch/blackfin/mach-bf537/boards/cm_bf537u.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644

arch/blackfin/mach-bf537/boards/minotaur.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644

arch/blackfin/mach-bf537/boards/pnav10.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644

arch/blackfin/mach-bf537/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644

arch/blackfin/mach-bf537/boards/tcm_bf537.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644

arch/blackfin/mach-bf538/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644

arch/blackfin/mach-bf548/boards/cm_bf548.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644

arch/blackfin/mach-bf548/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644

arch/blackfin/mach-bf561/boards/acvilon.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644

arch/blackfin/mach-bf561/boards/cm_bf561.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644

arch/mips/alchemy/devboards/db1200/platform.c +1 -1
@@ -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),
drivers/mtd/devices/m25p80.c +0 -0
index bf5a002..4244468 100644
@@ -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;
(quoted diff) +0 -0

b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644

drivers/mtd/devices/mtd_dataflash.c +1 -1
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index 684247a..989758d 100644
@@ -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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 17 lines
1.7.1


--------------060709080905090008050504
Content-Type: text/x-vcard; charset=utf-8;
 name="alexis_rodet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="alexis_rodet.vcf"

YmVnaW46dmNhcmQNCmZuOkFsZXhpcyBST0RFVA0KbjpST0RFVDtBbGV4aXMNCm9yZzpCcmFp
biBWaXNpb24gU3lzdGVtcw0KYWRyOjs7MzIgcnVlIGR1IEphdmVsb3Q7UEFSSVM7Ozc1MDEz
O0ZSQU5DRQ0KZW1haWw7aW50ZXJuZXQ6YWxleGlzLnJvZGV0QGJ2cy10ZWNoLmNvbQ0KdGl0
bGU6SGFyZHdhcmUgRW5naW5lZXINCnRlbDt3b3JrOiszMyA5IDUzIDkyIDE0IDQxDQp0ZWw7
ZmF4OiszMyA5IDU4IDkyIDE0IDQxDQp4LW1vemlsbGEtaHRtbDpGQUxTRQ0KdXJsOmh0dHA6
Ly93d3cuYnZzLXRlY2guY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------060709080905090008050504--
#3 lore raw

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

In reply to Russell King - ARM Linux

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(-)
arch/arm/mach-at91/board-cam60.c +1 -1
index b54e3e6..50780b2 100644
@@ -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)
arch/arm/mach-at91/board-ecbat91.c +1 -1
index 7b58c94..8598237 100644
@@ -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)
arch/arm/mach-dove/dove-db-setup.c +1 -1
index 95925aa..90f8f95 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
index 285edab..b60003f 100644
@@ -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,
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -1
index 1e5266f..16356c8 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -1
index 0049614..d3b706f 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/t5325-setup.c +1 -1
index ce50e61..d086983 100644
@@ -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,
arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
index f781164..14c7825 100644
@@ -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,
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -1
index 02ff45f..b18bb24 100644
@@ -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,
arch/arm/mach-w90x900/dev.c +1 -1
index 7a1fa6a..12d7f7c 100644
@@ -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),
arch/blackfin/mach-bf518/boards/ezbrd.c +1 -1
index b894c8a..ded02c1 100644
@@ -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),
arch/blackfin/mach-bf518/boards/tcm-bf518.c +1 -1
index e6ce1d7..66817b0 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ad7160eval.c +1 -1
index fc767ac..c43724b 100644
@@ -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),
arch/blackfin/mach-bf527/boards/cm_bf527.c +1 -1
index 2c31af7..3d5a3dc 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezbrd.c +1 -1
index 9a736a8..6670939 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezkit.c +1 -1
index 9222bc0..78a07e7 100644
@@ -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),
arch/blackfin/mach-bf527/boards/tll6527m.c +1 -1
index 9ec5757..147374b 100644
@@ -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),
arch/blackfin/mach-bf533/boards/H8606.c +1 -1
index 2ce7b16..60ff37f 100644
@@ -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),
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -1
index 20c1022..cbdcca1 100644
@@ -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),
arch/blackfin/mach-bf533/boards/cm_bf533.c +1 -1
index adbe62a..6448686 100644
@@ -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),
arch/blackfin/mach-bf533/boards/ezkit.c +1 -1
index a1cb8e7..4e1ee73 100644
@@ -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),
arch/blackfin/mach-bf533/boards/stamp.c +1 -1
index b3b1cde..8554b38 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537e.c +1 -1
index 836698c..c1bb193 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537u.c +1 -1
index 2a85670..da1886e 100644
@@ -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),
arch/blackfin/mach-bf537/boards/minotaur.c +1 -1
index 4980051..c360f10 100644
@@ -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),
arch/blackfin/mach-bf537/boards/pnav10.c +1 -1
index b958078..aab7edd 100644
@@ -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),
arch/blackfin/mach-bf537/boards/stamp.c +2 -2
index 3aa344c..633cbf0 100644
@@ -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),
arch/blackfin/mach-bf537/boards/tcm_bf537.c +1 -1
index 31498ad..557747f 100644
@@ -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),
arch/blackfin/mach-bf538/boards/ezkit.c +1 -1
index c6fb0a5..de9ab68 100644
@@ -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),
arch/blackfin/mach-bf548/boards/cm_bf548.c +1 -1
index f0c0eef..7effe25 100644
@@ -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),
arch/blackfin/mach-bf548/boards/ezkit.c +1 -1
index 216e269..1ab35e3 100644
@@ -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),
arch/blackfin/mach-bf561/boards/acvilon.c +1 -1
index 0b1c20f..7f69032 100644
@@ -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),
arch/blackfin/mach-bf561/boards/cm_bf561.c +1 -1
index 087b6b0..80073ac 100644
@@ -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),
arch/mips/alchemy/devboards/db1200/platform.c +1 -1
index fbb5593..ea9bf90 100644
@@ -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),
drivers/mtd/devices/m25p80.c +1 -1
index bf5a002..4244468 100644
@@ -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;
drivers/mtd/devices/mtd_dataflash.c +1 -1
index c5015cc..9cb2727 100644
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index 684247a..989758d 100644
@@ -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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 17 lines
1.7.1


--------------030503060802050707000105
Content-Type: text/x-vcard; charset=utf-8;
 name="alexis_rodet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="alexis_rodet.vcf"

YmVnaW46dmNhcmQNCmZuOkFsZXhpcyBST0RFVA0KbjpST0RFVDtBbGV4aXMNCm9yZzpCcmFp
biBWaXNpb24gU3lzdGVtcw0KYWRyOjs7MzIgcnVlIGR1IEphdmVsb3Q7UEFSSVM7Ozc1MDEz
O0ZSQU5DRQ0KZW1haWw7aW50ZXJuZXQ6YWxleGlzLnJvZGV0QGJ2cy10ZWNoLmNvbQ0KdGl0
bGU6SGFyZHdhcmUgRW5naW5lZXINCnRlbDt3b3JrOiszMyA5IDUzIDkyIDE0IDQxDQp0ZWw7
ZmF4OiszMyA5IDU4IDkyIDE0IDQxDQp4LW1vemlsbGEtaHRtbDpGQUxTRQ0KdXJsOmh0dHA6
Ly93d3cuYnZzLXRlY2guY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------030503060802050707000105--
#4 lore raw

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

In reply to Russell King - ARM Linux

Hello,

Quoted 1 line

It would, however, be nice if _someone_ out there could produce a patch

Here is the patch and 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 compilations as I don't have blackfin compiler installed. I compiled successfully for x86 with allyesconfig and for Freescale mx27 with allmodconfig minus some incompatible drivers.

Best regards,
Alexis RODET

---
 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(-)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644

arch/arm/mach-at91/board-cam60.c +1 -0
@@ -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)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644

arch/arm/mach-at91/board-ecbat91.c +0 -0
@@ -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)

(quoted diff) +0 -0

b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644

arch/arm/mach-dove/dove-db-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/lacie_v2-common.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644

arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/t5325-setup.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644

arch/arm/mach-kirkwood/tsx1x-common.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644

arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +0 -0
@@ -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,

arch/arm/mach-w90x900/dev.c +0 -0
index 7a1fa6a..12d7f7c 100644
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644

arch/blackfin/mach-bf518/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644

arch/blackfin/mach-bf518/boards/tcm-bf518.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644

arch/blackfin/mach-bf527/boards/ad7160eval.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644

arch/blackfin/mach-bf527/boards/cm_bf527.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644

arch/blackfin/mach-bf527/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644

arch/blackfin/mach-bf527/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644

arch/blackfin/mach-bf527/boards/tll6527m.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644

arch/blackfin/mach-bf533/boards/H8606.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644

arch/blackfin/mach-bf533/boards/blackstamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644

arch/blackfin/mach-bf533/boards/cm_bf533.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644

arch/blackfin/mach-bf533/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644

arch/blackfin/mach-bf533/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644

arch/blackfin/mach-bf537/boards/cm_bf537e.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644

arch/blackfin/mach-bf537/boards/cm_bf537u.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644

arch/blackfin/mach-bf537/boards/minotaur.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644

arch/blackfin/mach-bf537/boards/pnav10.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644

arch/blackfin/mach-bf537/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644

arch/blackfin/mach-bf537/boards/tcm_bf537.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644

arch/blackfin/mach-bf538/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644

arch/blackfin/mach-bf548/boards/cm_bf548.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644

arch/blackfin/mach-bf548/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644

arch/blackfin/mach-bf561/boards/acvilon.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644

arch/blackfin/mach-bf561/boards/cm_bf561.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644

arch/mips/alchemy/devboards/db1200/platform.c +1 -0
@@ -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),
drivers/mtd/devices/m25p80.c +0 -0
index bf5a002..4244468 100644
@@ -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;

(quoted diff) +0 -0

b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644

drivers/mtd/devices/mtd_dataflash.c +1 -1
@@ -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

drivers/mtd/devices/sst25l.c +1 -1
@@ -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);
drivers/spi/spi_butterfly.c +1 -0
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 1 line
1.7.1
#5 lore raw

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

Hi Alexis,

Quoted 2 lines · Alexis RODET
Quoted 1 line

It would, however, be nice if _someone_ out there could produce a patch

Here is the patch and here is the command line used for doing this:

You need to CC the MTD maintainer and mailing list (David Woodhouse <[email protected]>, and linux-mtd at lists.infradead.org respectively), and maybe also the SPI subsystem maintainers (David Brownell <[email protected]>, Grant Likely <[email protected]>, spi-devel-general at lists.sourceforge.net).

baruch

Quoted 9 lines

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 compilations as I don't have blackfin compiler installed. I compiled successfully for x86 with allyesconfig and for Freescale mx27 with allmodconfig minus some incompatible drivers.

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#6 lore raw

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

Hello,

As I discussed with Russell King on the list
linux-arm-kernel at lists.infradead.org, there is a problem with the double definition of 'struct flash_platform_data' that are incompatible:

in arch/arm/include/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 include/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 headers are included in a number of machines or driver.
They make conflict when one has both spi flash and an other type of mtd flash on the same machine (my case).

I suppose the ARM version has no reason not to be platform independent, but that is an other problem.

I propose to rename SPI version of the structure as it is the younger and it is included in a less number of files. The patch (already sent on linux-arm-kernel at lists.infradead.org) is in attachment.

Best regards,
Alexis RODET

Le 21/11/2010 05:47, Baruch Siach a ?crit :

Quoted 4 lines

Hi Alexis,

Quoted 1 line · Alexis RODET
Quoted 1 line

It would, however, be nice if _someone_ out there could produce a patch

Quoted 9 lines
Quoted 1 line

Here is the patch and here is the command line used for doing this:

You need to CC the MTD maintainer and mailing list (David Woodhouse <[email protected]>, and linux-mtd at lists.infradead.org respectively), and maybe also the SPI subsystem maintainers (David Brownell <[email protected]>, Grant Likely <[email protected]>, spi-devel-general at lists.sourceforge.net).

baruch

-------------- next part --------------
An embedded message was scrubbed...
From: Alexis RODET <[email protected]>
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data'
in include/linux/spi/flash.h
Date: Fri, 19 Nov 2010 18:23:09 +0100
Size: 25208
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101122/8f4f2919/attachment-0001.mht>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexis_rodet.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101122/8f4f2919/attachment-0001.vcf>

#7 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 11 lines · Alexis RODET

Hello,

there is a problem with the double
definition of 'struct flash_platform_data' that are incompatible:

in arch/arm/include/asm/mach/flash.h:
in include/linux/spi/flash.h:

Both headers are included in a number of machines or driver.

And this patch doesn't touch machine or driver code, so it's incomplete.

ISTR the last time this issue was raised, a similar incomplete patch was proposed.

How about a patch that does the full rename??

- Dave

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#8 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hi David,

Quoted 10 lines · David Brownell
Quoted 8 lines · Alexis RODET

Hello,

there is a problem with the double
definition of 'struct flash_platform_data' that are incompatible:

in arch/arm/include/asm/mach/flash.h:
in include/linux/spi/flash.h:
Both headers are included in a number of machines or driver.

And this patch doesn't touch machine or driver code, so it's incomplete.

Look at the patch in previous mail attachment and you'll see it does.

39 files changed, 41 insertions(+), 41 deletions(-)

Sorry I didn't put it in message core because I already posted it on [email protected] I don't know the good usage.

Quoted 4 lines

ISTR the last time this issue was raised, a similar incomplete patch was proposed.

How about a patch that does the full rename??

What do you mean ?
Renaming 'struct flash_platform_data' from arch/arm/include/asm/mach/flash.h also ?
Or moving arch/arm/include/asm/mach/flash.h in common includes ?

Alexis

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev

_______________________________________________
spi-devel-general mailing list spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#9 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 4 lines · Alexis RODET
Quoted 1 line

And this patch doesn't touch machine or driver code,

so it's incomplete.
Look at the patch in previous mail attachment and you'll see it does.

Couldn't do that. Submit another patch, or
combine it with this one. Either way, once it
merges, "git bisect" needs to work"...

Quoted 2 lines
Quoted 1 line

How about a patch that does the full rename??

What do you mean ?

Apply the patch and everthing builds and works;
and if it's a series, "git bisect" also works".

------------------------------------------------------------------------------
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

#10 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hello David,

Quoted 13 lines · David Brownell
Quoted 4 lines · Alexis RODET
Quoted 1 line

And this patch doesn't touch machine or driver code,

so it's incomplete.
Look at the patch in previous mail attachment and you'll see it does.

Couldn't do that. Submit another patch, or combine it with this one. Either way, once it merges, "git bisect" needs to work"...

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

How about a patch that does the full rename??

What do you mean ?

Apply the patch and everthing builds and works; and if it's a series, "git bisect" also works".

So Here is the patch:
It modifies all *.c files that include <linux/spi/flash.h> and also the include/linux/spi/flash.h file to rename 'struct flash_platform_data' into 'struct spi_flash_platform_data'
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 compilations as I don't have blackfin nor mips compiler installed. I compiled successfully for x86 with allyesconfig and for Freescale mx27 with allmodconfig minus some incompatible drivers.

Best regards,
Alexis RODET

---
 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(-)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644

arch/arm/mach-at91/board-cam60.c +1 -0
@@ -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)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644

arch/arm/mach-at91/board-ecbat91.c +0 -0
@@ -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)

(quoted diff) +0 -0

b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644

arch/arm/mach-dove/dove-db-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/lacie_v2-common.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644

arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +0 -0
@@ -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

arch/arm/mach-kirkwood/t5325-setup.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644

arch/arm/mach-kirkwood/tsx1x-common.c +1 -0
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644

arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +0 -0
@@ -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,

arch/arm/mach-w90x900/dev.c +0 -0
index 7a1fa6a..12d7f7c 100644
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644

arch/blackfin/mach-bf518/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644

arch/blackfin/mach-bf518/boards/tcm-bf518.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644

arch/blackfin/mach-bf527/boards/ad7160eval.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644

arch/blackfin/mach-bf527/boards/cm_bf527.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644

arch/blackfin/mach-bf527/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644

arch/blackfin/mach-bf527/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644

arch/blackfin/mach-bf527/boards/tll6527m.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644

arch/blackfin/mach-bf533/boards/H8606.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644

arch/blackfin/mach-bf533/boards/blackstamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644

arch/blackfin/mach-bf533/boards/cm_bf533.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644

arch/blackfin/mach-bf533/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644

arch/blackfin/mach-bf533/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644

arch/blackfin/mach-bf537/boards/cm_bf537e.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644

arch/blackfin/mach-bf537/boards/cm_bf537u.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644

arch/blackfin/mach-bf537/boards/minotaur.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644

arch/blackfin/mach-bf537/boards/pnav10.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644

arch/blackfin/mach-bf537/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644

arch/blackfin/mach-bf537/boards/tcm_bf537.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644

arch/blackfin/mach-bf538/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644

arch/blackfin/mach-bf548/boards/cm_bf548.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644

arch/blackfin/mach-bf548/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644

arch/blackfin/mach-bf561/boards/acvilon.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644

arch/blackfin/mach-bf561/boards/cm_bf561.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644

arch/mips/alchemy/devboards/db1200/platform.c +1 -0
@@ -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),
drivers/mtd/devices/m25p80.c +0 -0
index bf5a002..4244468 100644
@@ -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;

(quoted diff) +0 -0

b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644

drivers/mtd/devices/mtd_dataflash.c +1 -1
@@ -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

drivers/mtd/devices/sst25l.c +1 -1
@@ -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);
drivers/spi/spi_butterfly.c +1 -0
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#11 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hi Alexis,

Quoted 20 lines · Alexis RODET
Quoted 13 lines · David Brownell
Quoted 4 lines · Alexis RODET
Quoted 1 line

And this patch doesn't touch machine or driver code,

so it's incomplete.
Look at the patch in previous mail attachment and you'll see it does.

Couldn't do that. Submit another patch, or combine it with this one. Either way, once it merges, "git bisect" needs to work"...

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

How about a patch that does the full rename??

What do you mean ?

Apply the patch and everthing builds and works; and if it's a series, "git bisect" also works".

So Here is the patch:

[snip]

Quoted 2 lines

-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {

Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'.

baruch

Signature · 7 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#12 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 12 lines · Baruch Siach

Hi Alexis,

Quoted 1 line

So Here is the patch:

[snip]

Quoted 2 lines

-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {

Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'.

baruch

I hope mail mailer will respect the copy-paste.

Alexis

Quoted 1 line

From 2dc4b4dd076c8ba0d9143cb6664e3413a4886850 Mon Sep 17 00:00:00 2001

In-Reply-To: <20101117160514.GA5308-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
References: <20101117160514.GA5308-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
From: Alexis RODET <alexis.rodet-zROAmvwsW6hWk0Htik3J/[email protected]>
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-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

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(-)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644

arch/arm/mach-at91/board-cam60.c +1 -1
@@ -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)
(quoted diff) +0 -0

b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644

arch/arm/mach-at91/board-ecbat91.c +0 -0
@@ -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)

(quoted diff) +0 -0

b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644

arch/arm/mach-dove/dove-db-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644

arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644

arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644

arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +0 -0
@@ -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",

};

(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644

arch/arm/mach-kirkwood/t5325-setup.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644

arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
@@ -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,
(quoted diff) +0 -0

b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644

arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +0 -0
@@ -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,
arch/arm/mach-w90x900/dev.c +0 -0
index 7a1fa6a..12d7f7c 100644
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644

arch/blackfin/mach-bf518/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644

arch/blackfin/mach-bf518/boards/tcm-bf518.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644

arch/blackfin/mach-bf527/boards/ad7160eval.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644

arch/blackfin/mach-bf527/boards/cm_bf527.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644

arch/blackfin/mach-bf527/boards/ezbrd.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644

arch/blackfin/mach-bf527/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644

arch/blackfin/mach-bf527/boards/tll6527m.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644

arch/blackfin/mach-bf533/boards/H8606.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644

arch/blackfin/mach-bf533/boards/blackstamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644

arch/blackfin/mach-bf533/boards/cm_bf533.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644

arch/blackfin/mach-bf533/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644

arch/blackfin/mach-bf533/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644

arch/blackfin/mach-bf537/boards/cm_bf537e.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644

arch/blackfin/mach-bf537/boards/cm_bf537u.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644

arch/blackfin/mach-bf537/boards/minotaur.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644

arch/blackfin/mach-bf537/boards/pnav10.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644

arch/blackfin/mach-bf537/boards/stamp.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644

arch/blackfin/mach-bf537/boards/tcm_bf537.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644

arch/blackfin/mach-bf538/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644

arch/blackfin/mach-bf548/boards/cm_bf548.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644

arch/blackfin/mach-bf548/boards/ezkit.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644

arch/blackfin/mach-bf561/boards/acvilon.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644

arch/blackfin/mach-bf561/boards/cm_bf561.c +0 -0
@@ -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),

(quoted diff) +0 -0

b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644

arch/mips/alchemy/devboards/db1200/platform.c +1 -1
@@ -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),
drivers/mtd/devices/m25p80.c +0 -0
index bf5a002..4244468 100644
@@ -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;
(quoted diff) +0 -0

b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644

drivers/mtd/devices/mtd_dataflash.c +1 -1
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index 684247a..989758d 100644
@@ -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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 1 line
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#13 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hi Alexis,

Quoted 6 lines · Alexis RODET
Quoted 5 lines · Baruch Siach

Hi Alexis,

Quoted 1 line

So Here is the patch:

[snip]

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {

Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'.

baruch

I hope mail mailer will respect the copy-paste.

Well, you mailer still breaks lines, e.g.:

Review static struct dsa_platform_data · line 52

Quoted 2 lines
(quoted diff) +0 -0
@@ -52,7 +52,7 @@ static struct dsa_platform_data
 mv88f6281gtw_ge_switch_plat_data = {

baruch

Signature · 7 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#14 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hi baruch,

I hope this time every thing is OK.

Quoted 8 lines · Baruch Siach

Hi Alexis,
Well, you mailer still breaks lines, e.g.:

Review static struct dsa_platform_data · line 52

Quoted 2 lines
(quoted diff) +0 -0
@@ -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-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
References: <20101117160514.GA5308-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
From: Alexis RODET <alexis.rodet-zROAmvwsW6hWk0Htik3J/[email protected]>
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-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

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(-)
arch/arm/mach-at91/board-cam60.c +1 -1
index b54e3e6..50780b2 100644
@@ -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)
arch/arm/mach-at91/board-ecbat91.c +1 -1
index 7b58c94..8598237 100644
@@ -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)
arch/arm/mach-dove/dove-db-setup.c +1 -1
index 95925aa..90f8f95 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
index 285edab..b60003f 100644
@@ -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,
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -1
index 1e5266f..16356c8 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -1
index 0049614..d3b706f 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/t5325-setup.c +1 -1
index ce50e61..d086983 100644
@@ -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,
arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
index f781164..14c7825 100644
@@ -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,
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -1
index 02ff45f..b18bb24 100644
@@ -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,
arch/arm/mach-w90x900/dev.c +1 -1
index 7a1fa6a..12d7f7c 100644
@@ -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),
arch/blackfin/mach-bf518/boards/ezbrd.c +1 -1
index b894c8a..ded02c1 100644
@@ -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),
arch/blackfin/mach-bf518/boards/tcm-bf518.c +1 -1
index e6ce1d7..66817b0 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ad7160eval.c +1 -1
index fc767ac..c43724b 100644
@@ -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),
arch/blackfin/mach-bf527/boards/cm_bf527.c +1 -1
index 2c31af7..3d5a3dc 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezbrd.c +1 -1
index 9a736a8..6670939 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezkit.c +1 -1
index 9222bc0..78a07e7 100644
@@ -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),
arch/blackfin/mach-bf527/boards/tll6527m.c +1 -1
index 9ec5757..147374b 100644
@@ -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),
arch/blackfin/mach-bf533/boards/H8606.c +1 -1
index 2ce7b16..60ff37f 100644
@@ -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),
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -1
index 20c1022..cbdcca1 100644
@@ -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),
arch/blackfin/mach-bf533/boards/cm_bf533.c +1 -1
index adbe62a..6448686 100644
@@ -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),
arch/blackfin/mach-bf533/boards/ezkit.c +1 -1
index a1cb8e7..4e1ee73 100644
@@ -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),
arch/blackfin/mach-bf533/boards/stamp.c +1 -1
index b3b1cde..8554b38 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537e.c +1 -1
index 836698c..c1bb193 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537u.c +1 -1
index 2a85670..da1886e 100644
@@ -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),
arch/blackfin/mach-bf537/boards/minotaur.c +1 -1
index 4980051..c360f10 100644
@@ -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),
arch/blackfin/mach-bf537/boards/pnav10.c +1 -1
index b958078..aab7edd 100644
@@ -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),
arch/blackfin/mach-bf537/boards/stamp.c +2 -2
index 3aa344c..633cbf0 100644
@@ -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),
arch/blackfin/mach-bf537/boards/tcm_bf537.c +1 -1
index 31498ad..557747f 100644
@@ -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),
arch/blackfin/mach-bf538/boards/ezkit.c +1 -1
index c6fb0a5..de9ab68 100644
@@ -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),
arch/blackfin/mach-bf548/boards/cm_bf548.c +1 -1
index f0c0eef..7effe25 100644
@@ -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),
arch/blackfin/mach-bf548/boards/ezkit.c +1 -1
index 216e269..1ab35e3 100644
@@ -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),
arch/blackfin/mach-bf561/boards/acvilon.c +1 -1
index 0b1c20f..7f69032 100644
@@ -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),
arch/blackfin/mach-bf561/boards/cm_bf561.c +1 -1
index 087b6b0..80073ac 100644
@@ -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),
arch/mips/alchemy/devboards/db1200/platform.c +1 -1
index fbb5593..ea9bf90 100644
@@ -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),
drivers/mtd/devices/m25p80.c +1 -1
index bf5a002..4244468 100644
@@ -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;
drivers/mtd/devices/mtd_dataflash.c +1 -1
index c5015cc..9cb2727 100644
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index 684247a..989758d 100644
@@ -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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 1 line
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#15 lore raw

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 3 lines · Alexis RODET

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.

Quoted 2 lines

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.

Quoted 585 lines

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(-)
arch/arm/mach-at91/board-cam60.c +1 -1
index b54e3e6..50780b2 100644
@@ -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)
arch/arm/mach-at91/board-ecbat91.c +1 -1
index 7b58c94..8598237 100644
@@ -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)
arch/arm/mach-dove/dove-db-setup.c +1 -1
index 95925aa..90f8f95 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
index 285edab..b60003f 100644
@@ -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,
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -1
index 1e5266f..16356c8 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -1
index 0049614..d3b706f 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/t5325-setup.c +1 -1
index ce50e61..d086983 100644
@@ -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,
arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
index f781164..14c7825 100644
@@ -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,
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -1
index 02ff45f..b18bb24 100644
@@ -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,
arch/arm/mach-w90x900/dev.c +1 -1
index 7a1fa6a..12d7f7c 100644
@@ -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),
arch/blackfin/mach-bf518/boards/ezbrd.c +1 -1
index b894c8a..ded02c1 100644
@@ -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),
arch/blackfin/mach-bf518/boards/tcm-bf518.c +1 -1
index e6ce1d7..66817b0 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ad7160eval.c +1 -1
index fc767ac..c43724b 100644
@@ -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),
arch/blackfin/mach-bf527/boards/cm_bf527.c +1 -1
index 2c31af7..3d5a3dc 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezbrd.c +1 -1
index 9a736a8..6670939 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ezkit.c +1 -1
index 9222bc0..78a07e7 100644
@@ -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),
arch/blackfin/mach-bf527/boards/tll6527m.c +1 -1
index 9ec5757..147374b 100644
@@ -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),
arch/blackfin/mach-bf533/boards/H8606.c +1 -1
index 2ce7b16..60ff37f 100644
@@ -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),
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -1
index 20c1022..cbdcca1 100644
@@ -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),
arch/blackfin/mach-bf533/boards/cm_bf533.c +1 -1
index adbe62a..6448686 100644
@@ -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),
arch/blackfin/mach-bf533/boards/ezkit.c +1 -1
index a1cb8e7..4e1ee73 100644
@@ -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),
arch/blackfin/mach-bf533/boards/stamp.c +1 -1
index b3b1cde..8554b38 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537e.c +1 -1
index 836698c..c1bb193 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537u.c +1 -1
index 2a85670..da1886e 100644
@@ -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),
arch/blackfin/mach-bf537/boards/minotaur.c +1 -1
index 4980051..c360f10 100644
@@ -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),
arch/blackfin/mach-bf537/boards/pnav10.c +1 -1
index b958078..aab7edd 100644
@@ -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),
arch/blackfin/mach-bf537/boards/stamp.c +2 -2
index 3aa344c..633cbf0 100644
@@ -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),
arch/blackfin/mach-bf537/boards/tcm_bf537.c +1 -1
index 31498ad..557747f 100644
@@ -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),
arch/blackfin/mach-bf538/boards/ezkit.c +1 -1
index c6fb0a5..de9ab68 100644
@@ -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),
arch/blackfin/mach-bf548/boards/cm_bf548.c +1 -1
index f0c0eef..7effe25 100644
@@ -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),
arch/blackfin/mach-bf548/boards/ezkit.c +1 -1
index 216e269..1ab35e3 100644
@@ -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),
arch/blackfin/mach-bf561/boards/acvilon.c +1 -1
index 0b1c20f..7f69032 100644
@@ -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),
arch/blackfin/mach-bf561/boards/cm_bf561.c +1 -1
index 087b6b0..80073ac 100644
@@ -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),
arch/mips/alchemy/devboards/db1200/platform.c +1 -1
index fbb5593..ea9bf90 100644
@@ -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),
drivers/mtd/devices/m25p80.c +1 -1
index bf5a002..4244468 100644
@@ -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;
drivers/mtd/devices/mtd_dataflash.c +1 -1
index c5015cc..9cb2727 100644
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index 684247a..989758d 100644
@@ -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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 14 lines
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d

#16 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Hello Grant,

Quoted 5 lines · Grant Likely

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.

Quoted 4 lines

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 ?

Quoted 6 lines
Quoted 2 lines

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.

Quoted 3 lines

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

begin:vcard
fn:Alexis RODET
n:RODET;Alexis
org:Brain Vision Systems
adr:;;32 rue du Javelot;PARIS;;75013;FRANCE
email;internet:[email protected]
title:Hardware Engineer
tel;work:+33 9 53 92 14 41
tel;fax:+33 9 58 92 14 41
x-mozilla-html:FALSE
url:http://www.bvs-tech.com
version:2.1
end:vcard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#17 lore raw

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

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/cm-a510.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-mx5/board-mx51_efikamx.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/dnp5370.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 ++--
 42 files changed, 44 insertions(+), 44 deletions(-)
arch/arm/mach-at91/board-cam60.c +1 -1
index b54e3e6..50780b2 100644
@@ -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)
arch/arm/mach-at91/board-ecbat91.c +1 -1
index de2fd04..077c095 100644
@@ -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)
arch/arm/mach-dove/cm-a510.c +1 -1
index 96e0e94..28d21cf 100644
@@ -38,7 +38,7 @@ static struct mv_sata_platform_data cm_a510_sata_data = {
  * SPI Devices:
  * SPI0: 1M Flash Winbond w25q32bv
  */
-static const struct flash_platform_data cm_a510_spi_flash_data = {
+static const struct spi_flash_platform_data cm_a510_spi_flash_data = {
 	.type		= "w25q32bv",
 };
 
arch/arm/mach-dove/dove-db-setup.c +1 -1
index 95925aa..90f8f95 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
index 285edab..b60003f 100644
@@ -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,
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -1
index 1e5266f..16356c8 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -1
index 0049614..d3b706f 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/t5325-setup.c +1 -1
index ce50e61..d086983 100644
@@ -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,
arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
index f781164..14c7825 100644
@@ -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,
arch/arm/mach-mx5/board-mx51_efikamx.c +1 -1
index b7946f8..312816c 100644
@@ -278,7 +278,7 @@ static struct mtd_partition mx51_efikamx_spi_nor_partitions[] = {
 	},
 };
 
-static struct flash_platform_data mx51_efikamx_spi_flash_data = {
+static struct spi_flash_platform_data mx51_efikamx_spi_flash_data = {
 	.name		= "spi_flash",
 	.parts		= mx51_efikamx_spi_nor_partitions,
 	.nr_parts	= ARRAY_SIZE(mx51_efikamx_spi_nor_partitions),
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -1
index 02ff45f..b18bb24 100644
@@ -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,
arch/arm/mach-w90x900/dev.c +1 -1
index 7a1fa6a..12d7f7c 100644
@@ -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),
arch/blackfin/mach-bf518/boards/ezbrd.c +1 -1
index c0ccadc..0e994ad 100644
@@ -177,7 +177,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),
arch/blackfin/mach-bf518/boards/tcm-bf518.c +1 -1
index 50fc5c8..11a1032 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ad7160eval.c +1 -1
index ccab4c6..bb410f9 100644
@@ -255,7 +255,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),
arch/blackfin/mach-bf527/boards/cm_bf527.c +1 -1
index c9d6dc8..845501f 100644
@@ -344,7 +344,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),
arch/blackfin/mach-bf527/boards/ezbrd.c +1 -1
index b7101aa..31c9f87 100644
@@ -243,7 +243,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),
arch/blackfin/mach-bf527/boards/ezkit.c +1 -1
index 2cd2ff6..58cdd25 100644
@@ -437,7 +437,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),
arch/blackfin/mach-bf527/boards/tll6527m.c +1 -1
index 18d303d..7a4312e 100644
@@ -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),
arch/blackfin/mach-bf533/boards/H8606.c +1 -1
index d4bfcea..e4ea336 100644
@@ -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),
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -1
index 87b5af3..db7442e 100644
@@ -92,7 +92,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),
arch/blackfin/mach-bf533/boards/cm_bf533.c +1 -1
index 4d5604e..f1641bc 100644
@@ -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),
arch/blackfin/mach-bf533/boards/ezkit.c +1 -1
index b67b91d..5ee8905 100644
@@ -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),
arch/blackfin/mach-bf533/boards/stamp.c +1 -1
index 43224ef..0b1e7c3 100644
@@ -162,7 +162,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),
arch/blackfin/mach-bf537/boards/cm_bf537e.c +1 -1
index 2c776e1..bfe12ed 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537u.c +1 -1
index 0856611..4895f10 100644
@@ -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),
arch/blackfin/mach-bf537/boards/dnp5370.c +1 -1
index e1e9ea0..34b0137 100644
@@ -171,7 +171,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     = "mtd_dataflash",
 	.parts    = bfin_spi_dataflash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
arch/blackfin/mach-bf537/boards/minotaur.c +1 -1
index bfb3671..46a6120 100644
@@ -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),
arch/blackfin/mach-bf537/boards/pnav10.c +1 -1
index 9389f03..88f88e2 100644
@@ -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),
arch/blackfin/mach-bf537/boards/stamp.c +2 -2
index 2c69785..a486292 100644
@@ -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),
arch/blackfin/mach-bf537/boards/tcm_bf537.c +1 -1
index 0761b20..13ff1ac 100644
@@ -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),
arch/blackfin/mach-bf538/boards/ezkit.c +1 -1
index e61424e..2d73490 100644
@@ -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),
arch/blackfin/mach-bf548/boards/cm_bf548.c +1 -1
index d11502a..328503b 100644
@@ -852,7 +852,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),
arch/blackfin/mach-bf548/boards/ezkit.c +1 -1
index ce5a2bb..2a27868 100644
@@ -960,7 +960,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),
arch/blackfin/mach-bf561/boards/acvilon.c +1 -1
index 3926cd9..40d99f3 100644
@@ -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),
arch/blackfin/mach-bf561/boards/cm_bf561.c +1 -1
index 3b67929..aaae6ca 100644
@@ -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),
arch/mips/alchemy/devboards/db1200/platform.c +1 -1
index fbb5593..ea9bf90 100644
@@ -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),
drivers/mtd/devices/m25p80.c +1 -1
index e4eba6c..ec836ab 100644
@@ -797,7 +797,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;
drivers/mtd/devices/mtd_dataflash.c +1 -1
index c5015cc..9cb2727 100644
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index c163e61..c902c4f 100644
@@ -379,7 +379,7 @@ static int __devinit 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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 6 lines
1.7.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

A message that is not in the archive (sent off-list or not yet received): 4D3D6472.8030505-zROAmvwsW6hWk0Htik3J/[email protected]

#19 lore raw

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

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/cm-a510.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-mx5/board-mx51_efikamx.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/dnp5370.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 ++--
 42 files changed, 44 insertions(+), 44 deletions(-)
arch/arm/mach-at91/board-cam60.c +1 -1
index b54e3e6..50780b2 100644
@@ -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)
arch/arm/mach-at91/board-ecbat91.c +1 -1
index de2fd04..077c095 100644
@@ -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)
arch/arm/mach-dove/cm-a510.c +1 -1
index 96e0e94..28d21cf 100644
@@ -38,7 +38,7 @@ static struct mv_sata_platform_data cm_a510_sata_data = {
  * SPI Devices:
  * SPI0: 1M Flash Winbond w25q32bv
  */
-static const struct flash_platform_data cm_a510_spi_flash_data = {
+static const struct spi_flash_platform_data cm_a510_spi_flash_data = {
 	.type		= "w25q32bv",
 };
 
arch/arm/mach-dove/dove-db-setup.c +1 -1
index 95925aa..90f8f95 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/lacie_v2-common.c +1 -1
index 285edab..b60003f 100644
@@ -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,
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +1 -1
index 1e5266f..16356c8 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c +1 -1
index 0049614..d3b706f 100644
@@ -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",
 };
 
arch/arm/mach-kirkwood/t5325-setup.c +1 -1
index ce50e61..d086983 100644
@@ -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,
arch/arm/mach-kirkwood/tsx1x-common.c +1 -1
index f781164..14c7825 100644
@@ -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,
arch/arm/mach-mx5/board-mx51_efikamx.c +1 -1
index b7946f8..312816c 100644
@@ -278,7 +278,7 @@ static struct mtd_partition mx51_efikamx_spi_nor_partitions[] = {
 	},
 };
 
-static struct flash_platform_data mx51_efikamx_spi_flash_data = {
+static struct spi_flash_platform_data mx51_efikamx_spi_flash_data = {
 	.name		= "spi_flash",
 	.parts		= mx51_efikamx_spi_nor_partitions,
 	.nr_parts	= ARRAY_SIZE(mx51_efikamx_spi_nor_partitions),
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +1 -1
index 02ff45f..b18bb24 100644
@@ -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,
arch/arm/mach-w90x900/dev.c +1 -1
index 7a1fa6a..12d7f7c 100644
@@ -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),
arch/blackfin/mach-bf518/boards/ezbrd.c +1 -1
index c0ccadc..0e994ad 100644
@@ -177,7 +177,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),
arch/blackfin/mach-bf518/boards/tcm-bf518.c +1 -1
index 50fc5c8..11a1032 100644
@@ -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),
arch/blackfin/mach-bf527/boards/ad7160eval.c +1 -1
index ccab4c6..bb410f9 100644
@@ -255,7 +255,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),
arch/blackfin/mach-bf527/boards/cm_bf527.c +1 -1
index c9d6dc8..845501f 100644
@@ -344,7 +344,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),
arch/blackfin/mach-bf527/boards/ezbrd.c +1 -1
index b7101aa..31c9f87 100644
@@ -243,7 +243,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),
arch/blackfin/mach-bf527/boards/ezkit.c +1 -1
index 2cd2ff6..58cdd25 100644
@@ -437,7 +437,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),
arch/blackfin/mach-bf527/boards/tll6527m.c +1 -1
index 18d303d..7a4312e 100644
@@ -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),
arch/blackfin/mach-bf533/boards/H8606.c +1 -1
index d4bfcea..e4ea336 100644
@@ -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),
arch/blackfin/mach-bf533/boards/blackstamp.c +1 -1
index 87b5af3..db7442e 100644
@@ -92,7 +92,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),
arch/blackfin/mach-bf533/boards/cm_bf533.c +1 -1
index 4d5604e..f1641bc 100644
@@ -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),
arch/blackfin/mach-bf533/boards/ezkit.c +1 -1
index b67b91d..5ee8905 100644
@@ -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),
arch/blackfin/mach-bf533/boards/stamp.c +1 -1
index 43224ef..0b1e7c3 100644
@@ -162,7 +162,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),
arch/blackfin/mach-bf537/boards/cm_bf537e.c +1 -1
index 2c776e1..bfe12ed 100644
@@ -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),
arch/blackfin/mach-bf537/boards/cm_bf537u.c +1 -1
index 0856611..4895f10 100644
@@ -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),
arch/blackfin/mach-bf537/boards/dnp5370.c +1 -1
index e1e9ea0..34b0137 100644
@@ -171,7 +171,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     = "mtd_dataflash",
 	.parts    = bfin_spi_dataflash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
arch/blackfin/mach-bf537/boards/minotaur.c +1 -1
index bfb3671..46a6120 100644
@@ -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),
arch/blackfin/mach-bf537/boards/pnav10.c +1 -1
index 9389f03..88f88e2 100644
@@ -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),
arch/blackfin/mach-bf537/boards/stamp.c +2 -2
index 2c69785..a486292 100644
@@ -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),
arch/blackfin/mach-bf537/boards/tcm_bf537.c +1 -1
index 0761b20..13ff1ac 100644
@@ -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),
arch/blackfin/mach-bf538/boards/ezkit.c +1 -1
index e61424e..2d73490 100644
@@ -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),
arch/blackfin/mach-bf548/boards/cm_bf548.c +1 -1
index d11502a..328503b 100644
@@ -852,7 +852,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),
arch/blackfin/mach-bf548/boards/ezkit.c +1 -1
index ce5a2bb..2a27868 100644
@@ -960,7 +960,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),
arch/blackfin/mach-bf561/boards/acvilon.c +1 -1
index 3926cd9..40d99f3 100644
@@ -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),
arch/blackfin/mach-bf561/boards/cm_bf561.c +1 -1
index 3b67929..aaae6ca 100644
@@ -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),
arch/mips/alchemy/devboards/db1200/platform.c +1 -1
index fbb5593..ea9bf90 100644
@@ -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),
drivers/mtd/devices/m25p80.c +1 -1
index e4eba6c..ec836ab 100644
@@ -797,7 +797,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;
drivers/mtd/devices/mtd_dataflash.c +1 -1
index c5015cc..9cb2727 100644
@@ -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;
 
drivers/mtd/devices/sst25l.c +1 -1
index c163e61..c902c4f 100644
@@ -379,7 +379,7 @@ static int __devinit 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);
drivers/spi/spi_butterfly.c +1 -1
index 0d4ceba..a9ac6b2 100644
@@ -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),
include/linux/spi/flash.h +2 -2
index 3f22932..946145e 100644
@@ -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;
Signature · 9 lines
1.7.1


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
#20 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

In reply to Alexis RODET

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

Quoted 5 lines · Alexis RODET
Quoted 4 lines

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 ?

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d

_______________________________________________
spi-devel-general mailing list spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#21 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 4 lines · Alexis RODET

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.

Quoted 2 lines

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.

Signature · 9 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
#22 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 5 lines · Grant Likely

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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d

_______________________________________________
spi-devel-general mailing list spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#23 lore raw

PATCH 1/1 merging arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h into single header file include/linux/mtd/flash.h

---
 arch/arm/include/asm/mach/flash.h |   35 +------------------------
 include/linux/mtd/flash.h         |   51 +++++++++++++++++++++++++++++++++++++
 include/linux/spi/flash.h         |   27 +-------------------
 3 files changed, 53 insertions(+), 60 deletions(-)
arch/arm/include/asm/mach/flash.h +1 -34
index 4ca69fe..28bd58b 100644
@@ -1,39 +1,6 @@
-/*
- *  arch/arm/include/asm/mach/flash.h
- *
- *  Copyright (C) 2003 Russell King, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
 #ifndef ASMARM_MACH_FLASH_H
 #define ASMARM_MACH_FLASH_H
 
-struct mtd_partition;
-struct mtd_info;
-
-/*
- * map_name:	the map probe function name
- * name:	flash device name (eg, as used with mtdparts=)
- * width:	width of mapped device
- * init:	method called at driver/device initialisation
- * exit:	method called at driver/device removal
- * set_vpp:	method called to enable or disable VPP
- * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
- * parts:	optional array of mtd_partitions for static partitioning
- * nr_parts:	number of mtd_partitions for static partitoning
- */
-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;
-};
+#include <linux/mtd/flash.h>
 
 #endif
include/linux/mtd/flash.h new file +51 -0

51 lines not on this page · raw message

include/linux/spi/flash.h +1 -26
index 3f22932..c7ed65e 100644
@@ -1,31 +1,6 @@
 #ifndef LINUX_SPI_FLASH_H
 #define LINUX_SPI_FLASH_H
 
-struct mtd_partition;
-
-/**
- * struct 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
- * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
- *	with chips that can't be queried for JEDEC or other IDs
- *
- * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
- * provide information about SPI flash parts (such as DataFlash) to
- * help set up the device and its appropriate default partitioning.
- *
- * 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 {
-	char		*name;
-	struct mtd_partition *parts;
-	unsigned int	nr_parts;
-
-	char		*type;
-
-	/* we'll likely add more ... use JEDEC IDs, etc */
-};
+#include <linux/mtd/flash.h>
 
 #endif
Signature · 9 lines
1.7.1


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
#24 lore raw

Re: [PATCH 1/1] merging arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h into single header file include/linux/mtd/flash.h

Quoted 2 lines · Alexis RODET

No commit description? You should always describe what you're doing and why.

I think I'm okay with this. What build testing have you performed?

g.

Quoted 152 lines
---
 arch/arm/include/asm/mach/flash.h |   35 +------------------------
 include/linux/mtd/flash.h         |   51 +++++++++++++++++++++++++++++++++++++
 include/linux/spi/flash.h         |   27 +-------------------
 3 files changed, 53 insertions(+), 60 deletions(-)
arch/arm/include/asm/mach/flash.h +1 -34
index 4ca69fe..28bd58b 100644
@@ -1,39 +1,6 @@
-/*
- *  arch/arm/include/asm/mach/flash.h
- *
- *  Copyright (C) 2003 Russell King, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
 #ifndef ASMARM_MACH_FLASH_H
 #define ASMARM_MACH_FLASH_H
 
-struct mtd_partition;
-struct mtd_info;
-
-/*
- * map_name:	the map probe function name
- * name:	flash device name (eg, as used with mtdparts=)
- * width:	width of mapped device
- * init:	method called at driver/device initialisation
- * exit:	method called at driver/device removal
- * set_vpp:	method called to enable or disable VPP
- * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
- * parts:	optional array of mtd_partitions for static partitioning
- * nr_parts:	number of mtd_partitions for static partitoning
- */
-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;
-};
+#include <linux/mtd/flash.h>
 
 #endif
include/linux/mtd/flash.h new file +51 -0
new file mode 100644
index 0000000..5379eee
@@ -0,0 +1,51 @@
+/*
+ *  include/linux/mtd/flash.h
+ *  merged from arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h
+ *
+ *  Copyright (C) 2003 Russell King, All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef LINUX_MTD_FLASH_H
+#define LINUX_MTD_FLASH_H
+
+struct mtd_partition;
+struct mtd_info;
+
+/**
+ * struct flash_platform_data: board-specific flash data
+ * @map_name:	the map probe function name
+ * @name:	optional flash device name (eg, as used with mtdparts=)
+ * @width:	width of mapped device
+ * @init:	method called at driver/device initialisation
+ * @exit:	method called at driver/device removal
+ * @set_vpp:	method called to enable or disable VPP
+ * @mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
+ * @parts:	optional array of mtd_partitions for static partitioning
+ * @nr_parts:	number of mtd_partitions for static partitoning
+ * @type:	optional flash device type (e.g. m25p80 vs m25p64), for use
+ *	with chips that can't be queried for JEDEC or other IDs
+ *
+ * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
+ * provide information about SPI flash parts (such as DataFlash) to
+ * help set up the device and its appropriate default partitioning.
+ *
+ * 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 {
+	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;
+	const char	*type;
+};
+
+#endif
include/linux/spi/flash.h +1 -26
index 3f22932..c7ed65e 100644
@@ -1,31 +1,6 @@
 #ifndef LINUX_SPI_FLASH_H
 #define LINUX_SPI_FLASH_H
 
-struct mtd_partition;
-
-/**
- * struct 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
- * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
- *	with chips that can't be queried for JEDEC or other IDs
- *
- * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
- * provide information about SPI flash parts (such as DataFlash) to
- * help set up the device and its appropriate default partitioning.
- *
- * 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 {
-	char		*name;
-	struct mtd_partition *parts;
-	unsigned int	nr_parts;
-
-	char		*type;
-
-	/* we'll likely add more ... use JEDEC IDs, etc */
-};
+#include <linux/mtd/flash.h>
 
 #endif
Signature · 6 lines
1.7.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2

#25 lore raw

PATCH 1/1 merging arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h into single header file include/linux/mtd/flash.h

In reply to Alexis RODET
---
 arch/arm/include/asm/mach/flash.h |   35 +------------------------
 include/linux/mtd/flash.h         |   51 +++++++++++++++++++++++++++++++++++++
 include/linux/spi/flash.h         |   27 +-------------------
 3 files changed, 53 insertions(+), 60 deletions(-)
arch/arm/include/asm/mach/flash.h +1 -34
index 4ca69fe..28bd58b 100644
@@ -1,39 +1,6 @@
-/*
- *  arch/arm/include/asm/mach/flash.h
- *
- *  Copyright (C) 2003 Russell King, All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
 #ifndef ASMARM_MACH_FLASH_H
 #define ASMARM_MACH_FLASH_H
 
-struct mtd_partition;
-struct mtd_info;
-
-/*
- * map_name:	the map probe function name
- * name:	flash device name (eg, as used with mtdparts=)
- * width:	width of mapped device
- * init:	method called at driver/device initialisation
- * exit:	method called at driver/device removal
- * set_vpp:	method called to enable or disable VPP
- * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
- * parts:	optional array of mtd_partitions for static partitioning
- * nr_parts:	number of mtd_partitions for static partitoning
- */
-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;
-};
+#include <linux/mtd/flash.h>
 
 #endif
include/linux/mtd/flash.h new file +51 -0

51 lines not on this page · raw message

include/linux/spi/flash.h +1 -26
index 3f22932..c7ed65e 100644
@@ -1,31 +1,6 @@
 #ifndef LINUX_SPI_FLASH_H
 #define LINUX_SPI_FLASH_H
 
-struct mtd_partition;
-
-/**
- * struct 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
- * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
- *	with chips that can't be queried for JEDEC or other IDs
- *
- * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
- * provide information about SPI flash parts (such as DataFlash) to
- * help set up the device and its appropriate default partitioning.
- *
- * 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 {
-	char		*name;
-	struct mtd_partition *parts;
-	unsigned int	nr_parts;
-
-	char		*type;
-
-	/* we'll likely add more ... use JEDEC IDs, etc */
-};
+#include <linux/mtd/flash.h>
 
 #endif
Signature · 6 lines
1.7.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#26 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

In reply to Grant Likely

Hello,

Quoted 9 lines · Grant Likely
Quoted 4 lines · Alexis RODET

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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d

_______________________________________________
spi-devel-general mailing list spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

#27 lore raw

Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

Quoted 6 lines · Alexis RODET

Hello,

Quoted 3 lines · Grant Likely
Quoted 2 lines · Alexis RODET

Hi again,

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d