Merge git://git.infradead.org/mtd-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 28 May 2011 03:06:53 +0000 (20:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 28 May 2011 03:06:53 +0000 (20:06 -0700)
* git://git.infradead.org/mtd-2.6: (97 commits)
  mtd: kill CONFIG_MTD_PARTITIONS
  mtd: remove add_mtd_partitions, add_mtd_device and friends
  mtd: convert remaining users to mtd_device_register()
  mtd: samsung onenand: convert to mtd_device_register()
  mtd: omap2 onenand: convert to mtd_device_register()
  mtd: txx9ndfmc: convert to mtd_device_register()
  mtd: tmio_nand: convert to mtd_device_register()
  mtd: socrates_nand: convert to mtd_device_register()
  mtd: sharpsl: convert to mtd_device_register()
  mtd: s3c2410 nand: convert to mtd_device_register()
  mtd: ppchameleonevb: convert to mtd_device_register()
  mtd: orion_nand: convert to mtd_device_register()
  mtd: omap2: convert to mtd_device_register()
  mtd: nomadik_nand: convert to mtd_device_register()
  mtd: ndfc: convert to mtd_device_register()
  mtd: mxc_nand: convert to mtd_device_register()
  mtd: mpc5121_nfc: convert to mtd_device_register()
  mtd: jz4740_nand: convert to mtd_device_register()
  mtd: h1910: convert to mtd_device_register()
  mtd: fsmc_nand: convert to mtd_device_register()
  ...

Fixed up trivial conflicts in
 - drivers/mtd/maps/integrator-flash.c: removed in ARM tree
 - drivers/mtd/maps/physmap.c: addition of afs partition probe type
   clashing with removal of CONFIG_MTD_PARTITIONS

1  2 
arch/blackfin/mach-bf537/boards/stamp.c
arch/cris/Kconfig
drivers/mtd/Kconfig
drivers/mtd/maps/Kconfig
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/maps/physmap.c
drivers/mtd/nand/au1550nd.c
drivers/mtd/nand/tmio_nand.c
fs/jffs2/dir.c
include/linux/mtd/physmap.h

index e16dc456004864b9e2eaa260667a1aa545279abb,94ecf100f9ea7497513307422ddd675c6d0e21c5..76db1d4831739027e32b38c4e8f5fc7762672b7f
@@@ -35,7 -35,6 +35,7 @@@
  #include <asm/reboot.h>
  #include <asm/portmux.h>
  #include <asm/dpmc.h>
 +#include <asm/bfin_sport.h>
  #ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
  #include <linux/regulator/fixed.h>
  #endif
@@@ -382,7 -381,6 +382,6 @@@ static struct platform_device net2272_b
  #endif
  
  #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
- #ifdef CONFIG_MTD_PARTITIONS
  const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
  
  static struct mtd_partition bfin_plat_nand_partitions[] = {
                .offset = MTDPART_OFS_APPEND,
        },
  };
- #endif
  
  #define BFIN_NAND_PLAT_CLE 2
  #define BFIN_NAND_PLAT_ALE 1
@@@ -423,11 -420,9 +421,9 @@@ static struct platform_nand_data bfin_p
        .chip = {
                .nr_chips = 1,
                .chip_delay = 30,
- #ifdef CONFIG_MTD_PARTITIONS
                .part_probe_types = part_probes,
                .partitions = bfin_plat_nand_partitions,
                .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
- #endif
        },
        .ctrl = {
                .cmd_ctrl  = bfin_plat_nand_cmd_ctrl,
@@@ -2586,103 -2581,27 +2582,103 @@@ static struct platform_device bfin_dpm
        },
  };
  
 -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
 +#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
 +      defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
 +      defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
 +
 +#define SPORT_REQ(x) \
 +      [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
 +              P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
 +
 +static const u16 bfin_snd_pin[][7] = {
 +      SPORT_REQ(0),
 +      SPORT_REQ(1),
 +};
 +
 +static struct bfin_snd_platform_data bfin_snd_data[] = {
 +      {
 +              .pin_req = &bfin_snd_pin[0][0],
 +      },
 +      {
 +              .pin_req = &bfin_snd_pin[1][0],
 +      },
 +};
 +
 +#define BFIN_SND_RES(x) \
 +      [x] = { \
 +              { \
 +                      .start = SPORT##x##_TCR1, \
 +                      .end = SPORT##x##_TCR1, \
 +                      .flags = IORESOURCE_MEM \
 +              }, \
 +              { \
 +                      .start = CH_SPORT##x##_RX, \
 +                      .end = CH_SPORT##x##_RX, \
 +                      .flags = IORESOURCE_DMA, \
 +              }, \
 +              { \
 +                      .start = CH_SPORT##x##_TX, \
 +                      .end = CH_SPORT##x##_TX, \
 +                      .flags = IORESOURCE_DMA, \
 +              }, \
 +              { \
 +                      .start = IRQ_SPORT##x##_ERROR, \
 +                      .end = IRQ_SPORT##x##_ERROR, \
 +                      .flags = IORESOURCE_IRQ, \
 +              } \
 +      }
 +
 +static struct resource bfin_snd_resources[][4] = {
 +      BFIN_SND_RES(0),
 +      BFIN_SND_RES(1),
 +};
 +
 +static struct platform_device bfin_pcm = {
 +      .name = "bfin-pcm-audio",
 +      .id = -1,
 +};
 +#endif
 +
 +#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
 +static struct platform_device bfin_ad73311_codec_device = {
 +      .name = "ad73311",
 +      .id = -1,
 +};
 +#endif
 +
 +#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
  static struct platform_device bfin_i2s = {
        .name = "bfin-i2s",
        .id = CONFIG_SND_BF5XX_SPORT_NUM,
 -      /* TODO: add platform data here */
 +      .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
 +      .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
 +      .dev = {
 +              .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
 +      },
  };
  #endif
  
 -#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
 +#if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
  static struct platform_device bfin_tdm = {
        .name = "bfin-tdm",
        .id = CONFIG_SND_BF5XX_SPORT_NUM,
 -      /* TODO: add platform data here */
 +      .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
 +      .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
 +      .dev = {
 +              .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
 +      },
  };
  #endif
  
 -#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
 +#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
  static struct platform_device bfin_ac97 = {
        .name = "bfin-ac97",
        .id = CONFIG_SND_BF5XX_SPORT_NUM,
 -      /* TODO: add platform data here */
 +      .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
 +      .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
 +      .dev = {
 +              .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
 +      },
  };
  #endif
  
@@@ -2873,28 -2792,17 +2869,28 @@@ static struct platform_device *stamp_de
        &stamp_flash_device,
  #endif
  
 -#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
 +#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
 +      defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
 +      defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
 +      &bfin_pcm,
 +#endif
 +
 +#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
 +      &bfin_ad73311_codec_device,
 +#endif
 +
 +#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
        &bfin_i2s,
  #endif
  
 -#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
 +#if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
        &bfin_tdm,
  #endif
  
 -#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
 +#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
        &bfin_ac97,
  #endif
 +
  #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
  #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
        defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
diff --combined arch/cris/Kconfig
index b6b94a27d276abc037ae212a471c2cade7930da7,72facbced326d062cacce5eb0463fe700493f115..17addacb169eb4a6e0c5ca16e3f39d849b3035f4
@@@ -31,6 -31,10 +31,6 @@@ config ARCH_HAS_ILOG2_U6
        bool
        default n
  
 -config GENERIC_FIND_NEXT_BIT
 -      bool
 -      default y
 -
  config GENERIC_HWEIGHT
        bool
        default y
@@@ -270,7 -274,6 +270,6 @@@ config ETRAX_AXISFLASHMA
        select MTD_JEDECPROBE if ETRAX_ARCH_V32
        select MTD_CHAR
        select MTD_BLOCK
-       select MTD_PARTITIONS
        select MTD_COMPLEX_MAPPINGS
        help
          This option enables MTD mapping of flash devices.  Needed to use
diff --combined drivers/mtd/Kconfig
index bc50d5ea5534e5775a70f4da6e91fe717b3c5d2d,62b4fdbb9ad192e6f133838258c25d769e31acef..4be8373d43e5c6af542c8a5a609fc8402e9b1dc0
@@@ -33,20 -33,6 +33,6 @@@ config MTD_TEST
          should normally be compiled as kernel modules. The modules perform
          various checks and verifications when loaded.
  
- config MTD_PARTITIONS
-       bool "MTD partitioning support"
-       help
-         If you have a device which needs to divide its flash chip(s) up
-         into multiple 'partitions', each of which appears to the user as
-         a separate MTD device, you require this option to be enabled. If
-         unsure, say 'Y'.
-         Note, however, that you don't need this option for the DiskOnChip
-         devices. Partitioning on NFTL 'devices' is a different - that's the
-         'normal' form of partitioning used on a block device.
- if MTD_PARTITIONS
  config MTD_REDBOOT_PARTS
        tristate "RedBoot partition table parsing"
        ---help---
@@@ -99,7 -85,7 +85,7 @@@ endif # MTD_REDBOOT_PART
  
  config MTD_CMDLINE_PARTS
        bool "Command line partition table parsing"
-       depends on MTD_PARTITIONS = "y" && MTD = "y"
+       depends on MTD = "y"
        ---help---
          Allow generic configuration of the MTD partition tables via the kernel
          command line. Multiple flash resources are supported for hardware where
@@@ -148,7 -134,8 +134,7 @@@ config MTD_AFS_PART
  
          You will still need the parsing functions to be called by the driver
          for your particular device. It won't happen automatically. The
 -        'armflash' map driver (CONFIG_MTD_ARM_INTEGRATOR) does this, for
 -        example.
 +        'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
  
  config MTD_OF_PARTS
        def_bool y
@@@ -163,8 -150,6 +149,6 @@@ config MTD_AR7_PART
        ---help---
          TI AR7 partitioning support
  
- endif # MTD_PARTITIONS
  comment "User Modules And Translation Layers"
  
  config MTD_CHAR
diff --combined drivers/mtd/maps/Kconfig
index 5069111c81cca9511c0f016cfd20705bf2c723a6,195b9ef3b7eebfe672db0f235842860bb368127a..c0c328c5b133ccf51785a19385ae7a48a747aeaf
@@@ -82,7 -82,6 +82,6 @@@ config MTD_PHYSMAP_O
  config MTD_PMC_MSP_EVM
        tristate "CFI Flash device mapped on PMC-Sierra MSP"
        depends on PMC_MSP && MTD_CFI
-       select MTD_PARTITIONS
        help
          This provides a 'mapping' driver which supports the way
          in which user-programmable flash chips are connected on the
@@@ -122,7 -121,7 +121,7 @@@ config MTD_SC520CD
  
  config MTD_NETSC520
        tristate "CFI Flash device mapped on AMD NetSc520"
-       depends on X86 && MTD_CFI && MTD_PARTITIONS
+       depends on X86 && MTD_CFI
        help
          This enables access routines for the flash chips on the AMD NetSc520
          demonstration board. If you have one of these boards and would like
  config MTD_TS5500
        tristate "JEDEC Flash device mapped on Technologic Systems TS-5500"
        depends on X86
-       select MTD_PARTITIONS
        select MTD_JEDECPROBE
        select MTD_CFI_AMDSTD
        help
  
  config MTD_SBC_GXX
        tristate "CFI Flash device mapped on Arcom SBC-GXx boards"
-       depends on X86 && MTD_CFI_INTELEXT && MTD_PARTITIONS && MTD_COMPLEX_MAPPINGS
+       depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS
        help
          This provides a driver for the on-board flash of Arcom Control
          Systems' SBC-GXn family of boards, formerly known as SBC-MediaGX.
  config MTD_PXA2XX
        tristate "CFI Flash device mapped on Intel XScale PXA2xx based boards"
        depends on (PXA25x || PXA27x) && MTD_CFI_INTELEXT
-       select MTD_PARTITIONS
        help
          This provides a driver for the NOR flash attached to a PXA2xx chip.
  
@@@ -185,7 -182,7 +182,7 @@@ config MTD_VMA
  
  config MTD_SCx200_DOCFLASH
        tristate "Flash device mapped with DOCCS on NatSemi SCx200"
-       depends on SCx200 && MTD_CFI && MTD_PARTITIONS
+       depends on SCx200 && MTD_CFI
        help
          Enable support for a flash chip mapped using the DOCCS signal on a
          National Semiconductor SCx200 processor.
@@@ -247,7 -244,7 +244,7 @@@ config MTD_TSUNAM
  
  config MTD_NETtel
        tristate "CFI flash device on SnapGear/SecureEdge"
-       depends on X86 && MTD_PARTITIONS && MTD_JEDECPROBE
+       depends on X86 && MTD_JEDECPROBE
        help
          Support for flash chips on NETtel/SecureEdge/SnapGear boards.
  
@@@ -260,16 -257,9 +257,16 @@@ config MTD_BCM963X
          Support for parsing CFE image tag and creating MTD partitions on
          Broadcom BCM63xx boards.
  
 +config MTD_LANTIQ
 +      tristate "Lantiq SoC NOR support"
 +      depends on LANTIQ
 +      select MTD_PARTITIONS
 +      help
 +        Support for NOR flash attached to the Lantiq SoC's External Bus Unit.
 +
  config MTD_DILNETPC
        tristate "CFI Flash device mapped on DIL/Net PC"
-       depends on X86 && MTD_PARTITIONS && MTD_CFI_INTELEXT && BROKEN
+       depends on X86 && MTD_CFI_INTELEXT && BROKEN
        help
          MTD map driver for SSV DIL/Net PC Boards "DNP" and "ADNP".
          For details, see <http://www.ssv-embedded.de/ssv/pc104/p169.htm>
@@@ -355,7 -345,7 +352,7 @@@ config MTD_CDB8971
  
  config MTD_SA1100
        tristate "CFI Flash device mapped on StrongARM SA11x0"
-       depends on MTD_CFI && ARCH_SA1100 && MTD_PARTITIONS
+       depends on MTD_CFI && ARCH_SA1100
        help
          This enables access to the flash chips on most platforms based on
          the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
@@@ -389,7 -379,7 +386,7 @@@ config MTD_IXP200
  
  config MTD_FORTUNET
        tristate "CFI Flash device mapped on the FortuNet board"
-       depends on MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET
+       depends on MTD_CFI && SA1100_FORTUNET
        help
          This enables access to the Flash on the FortuNet board.  If you
          have such a board, say 'Y'.
@@@ -461,7 -451,6 +458,6 @@@ config MTD_PCMCIA_ANONYMOU
  config MTD_BFIN_ASYNC
        tristate "Blackfin BF533-STAMP Flash Chip Support"
        depends on BFIN533_STAMP && MTD_CFI && MTD_COMPLEX_MAPPINGS
-       select MTD_PARTITIONS
        default y
        help
          Map driver which allows for simultaneous utilization of
@@@ -473,7 -462,6 +469,6 @@@ config MTD_GPIO_ADD
        tristate "GPIO-assisted Flash Chip Support"
        depends on GENERIC_GPIO || GPIOLIB
        depends on MTD_COMPLEX_MAPPINGS
-       select MTD_PARTITIONS
        help
          Map driver which allows flashes to be partially physically addressed
          and assisted by GPIOs.
  
  config MTD_UCLINUX
        bool "Generic uClinux RAM/ROM filesystem support"
-       depends on MTD_PARTITIONS && MTD_RAM=y && !MMU
+       depends on MTD_RAM=y && !MMU
        help
          Map driver to support image based filesystems for uClinux.
  
  config MTD_WRSBC8260
        tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
        depends on (SBC82xx || SBC8560)
-       select MTD_PARTITIONS
        select MTD_MAP_BANK_WIDTH_4
        select MTD_MAP_BANK_WIDTH_1
        select MTD_CFI_I1
  config MTD_DMV182
          tristate "Map driver for Dy-4 SVME/DMV-182 board."
          depends on DMV182
-         select MTD_PARTITIONS
        select MTD_MAP_BANK_WIDTH_32
        select MTD_CFI_I8
        select MTD_CFI_AMDSTD
index 33dc2829b01bc1ac7a54cbb21450aaee70307a49,a523e2a6af53547e84d8552a391920b812d71285..bbe168b65c26a392e09bc8bdb4783b2d5c7ab06f
@@@ -630,7 -630,7 +630,7 @@@ static int pcmciamtd_config(struct pcmc
                dev->pcmcia_map.copy_to = pcmcia_copy_to;
        }
  
-       if(add_mtd_device(mtd)) {
+       if (mtd_device_register(mtd, NULL, 0)) {
                map_destroy(mtd);
                dev->mtd_info = NULL;
                dev_err(&dev->p_dev->dev,
@@@ -669,7 -669,7 +669,7 @@@ static void pcmciamtd_detach(struct pcm
        DEBUG(3, "link=0x%p", link);
  
        if(dev->mtd_info) {
-               del_mtd_device(dev->mtd_info);
+               mtd_device_unregister(dev->mtd_info);
                dev_info(&dev->p_dev->dev, "mtd%d: Removing\n",
                         dev->mtd_info->index);
                map_destroy(dev->mtd_info);
@@@ -694,7 -694,7 +694,7 @@@ static int pcmciamtd_probe(struct pcmci
        return pcmciamtd_config(link);
  }
  
 -static struct pcmcia_device_id pcmciamtd_ids[] = {
 +static const struct pcmcia_device_id pcmciamtd_ids[] = {
        PCMCIA_DEVICE_FUNC_ID(1),
        PCMCIA_DEVICE_PROD_ID123("IO DATA", "PCS-2M", "2MB SRAM", 0x547e66dc, 0x1fed36cd, 0x36eadd21),
        PCMCIA_DEVICE_PROD_ID12("IBM", "2MB SRAM", 0xb569a6e5, 0x36eadd21),
index 1a9b94f0ee54fb3fab12975cc6fcad08235b61fe,d2059261ca8b07d8c7068cb08b855cb548a8fe5d..f64cee4a3bfbeba9674fea84c4465e645d925594
@@@ -27,10 -27,8 +27,8 @@@ struct physmap_flash_info 
        struct mtd_info         *mtd[MAX_RESOURCES];
        struct mtd_info         *cmtd;
        struct map_info         map[MAX_RESOURCES];
- #ifdef CONFIG_MTD_PARTITIONS
        int                     nr_parts;
        struct mtd_partition    *parts;
- #endif
  };
  
  static int physmap_flash_remove(struct platform_device *dev)
        physmap_data = dev->dev.platform_data;
  
        if (info->cmtd) {
- #ifdef CONFIG_MTD_PARTITIONS
-               if (info->nr_parts || physmap_data->nr_parts) {
-                       del_mtd_partitions(info->cmtd);
-                       if (info->nr_parts)
-                               kfree(info->parts);
-               } else {
-                       del_mtd_device(info->cmtd);
-               }
- #else
-               del_mtd_device(info->cmtd);
- #endif
+               mtd_device_unregister(info->cmtd);
+               if (info->nr_parts)
+                       kfree(info->parts);
                if (info->cmtd != info->mtd[0])
                        mtd_concat_destroy(info->cmtd);
        }
                if (info->mtd[i] != NULL)
                        map_destroy(info->mtd[i]);
        }
 +
 +      if (physmap_data->exit)
 +              physmap_data->exit(dev);
 +
        return 0;
  }
  
 +static void physmap_set_vpp(struct map_info *map, int state)
 +{
 +      struct platform_device *pdev;
 +      struct physmap_flash_data *physmap_data;
 +
 +      pdev = (struct platform_device *)map->map_priv_1;
 +      physmap_data = pdev->dev.platform_data;
 +
 +      if (physmap_data->set_vpp)
 +              physmap_data->set_vpp(pdev, state);
 +}
 +
  static const char *rom_probe_types[] = {
                                        "cfi_probe",
                                        "jedec_probe",
                                        "qinfo_probe",
                                        "map_rom",
                                        NULL };
- #ifdef CONFIG_MTD_PARTITIONS
 -static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
 +static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "afs",
 +                                        NULL };
- #endif
  
  static int physmap_flash_probe(struct platform_device *dev)
  {
                goto err_out;
        }
  
 +      if (physmap_data->init) {
 +              err = physmap_data->init(dev);
 +              if (err)
 +                      goto err_out;
 +      }
 +
        platform_set_drvdata(dev, info);
  
        for (i = 0; i < dev->num_resources; i++) {
                info->map[i].phys = dev->resource[i].start;
                info->map[i].size = resource_size(&dev->resource[i]);
                info->map[i].bankwidth = physmap_data->width;
 -              info->map[i].set_vpp = physmap_data->set_vpp;
 +              info->map[i].set_vpp = physmap_set_vpp;
                info->map[i].pfow_base = physmap_data->pfow_base;
 +              info->map[i].map_priv_1 = (unsigned long)dev;
  
                info->map[i].virt = devm_ioremap(&dev->dev, info->map[i].phys,
                                                 info->map[i].size);
        if (err)
                goto err_out;
  
- #ifdef CONFIG_MTD_PARTITIONS
        err = parse_mtd_partitions(info->cmtd, part_probe_types,
-                               &info->parts, 0);
+                                  &info->parts, 0);
        if (err > 0) {
-               add_mtd_partitions(info->cmtd, info->parts, err);
+               mtd_device_register(info->cmtd, info->parts, err);
                info->nr_parts = err;
                return 0;
        }
  
        if (physmap_data->nr_parts) {
                printk(KERN_NOTICE "Using physmap partition information\n");
-               add_mtd_partitions(info->cmtd, physmap_data->parts,
-                                  physmap_data->nr_parts);
+               mtd_device_register(info->cmtd, physmap_data->parts,
+                                   physmap_data->nr_parts);
                return 0;
        }
- #endif
  
-       add_mtd_device(info->cmtd);
+       mtd_device_register(info->cmtd, NULL, 0);
        return 0;
  
  err_out:
@@@ -269,14 -231,12 +255,12 @@@ void physmap_configure(unsigned long ad
        physmap_flash_data.set_vpp = set_vpp;
  }
  
- #ifdef CONFIG_MTD_PARTITIONS
  void physmap_set_partitions(struct mtd_partition *parts, int num_parts)
  {
        physmap_flash_data.nr_parts = num_parts;
        physmap_flash_data.parts = parts;
  }
  #endif
- #endif
  
  static int __init physmap_init(void)
  {
index 5d513b54a7d7cd688711007145fa93d8d0b400ab,001545beab9a2a0ffc83349079a66fa017c066ef..e7767eef4505665279142ba57e13a43e6ac4b35b
@@@ -10,7 -10,6 +10,7 @@@
   */
  
  #include <linux/slab.h>
 +#include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/module.h>
  #include <linux/interrupt.h>
@@@ -471,7 -470,7 +471,7 @@@ static int __init au1xxx_nand_init(void
  
  #ifdef CONFIG_MIPS_PB1550
        /* set gpio206 high */
 -      au_writel(au_readl(GPIO2_DIR) & ~(1 << 6), GPIO2_DIR);
 +      gpio_direction_input(206);
  
        boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) | ((bcsr_read(BCSR_STATUS) >> 6) & 0x1);
  
        }
  
        /* Register the partitions */
-       add_mtd_partitions(au1550_mtd, partition_info, ARRAY_SIZE(partition_info));
+       mtd_device_register(au1550_mtd, partition_info,
+                           ARRAY_SIZE(partition_info));
  
        return 0;
  
index c004e474631b4c3deca7ae4ffff18333e5384c04,37cce8d75dcce55b108422145200d83d56584dad..11e8371b56834e8b0c79f64fe4d54393be849630
@@@ -372,7 -372,7 +372,7 @@@ static void tmio_hw_stop(struct platfor
  
  static int tmio_probe(struct platform_device *dev)
  {
 -      struct tmio_nand_data *data = mfd_get_data(dev);
 +      struct tmio_nand_data *data = dev->dev.platform_data;
        struct resource *fcr = platform_get_resource(dev,
                        IORESOURCE_MEM, 0);
        struct resource *ccr = platform_get_resource(dev,
        struct tmio_nand *tmio;
        struct mtd_info *mtd;
        struct nand_chip *nand_chip;
- #ifdef CONFIG_MTD_PARTITIONS
        struct mtd_partition *parts;
        int nbparts = 0;
- #endif
        int retval;
  
        if (data == NULL)
                goto err_scan;
        }
        /* Register the partitions */
- #ifdef CONFIG_MTD_PARTITIONS
  #ifdef CONFIG_MTD_CMDLINE_PARTS
        nbparts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
  #endif
                nbparts = data->num_partitions;
        }
  
-       if (nbparts)
-               retval = add_mtd_partitions(mtd, parts, nbparts);
-       else
- #endif
-       retval = add_mtd_device(mtd);
+       retval = mtd_device_register(mtd, parts, nbparts);
        if (!retval)
                return retval;
  
diff --combined fs/jffs2/dir.c
index 05f73328b28b40bf1ba30952faa64e7568d53a43,4bca6a2e5c07431628b5acb9c201bb4daf56ba55..9a1e86fc13623f24d52b5bb41feb216314e20ab2
@@@ -75,7 -75,6 +75,6 @@@ static struct dentry *jffs2_lookup(stru
                                   struct nameidata *nd)
  {
        struct jffs2_inode_info *dir_f;
-       struct jffs2_sb_info *c;
        struct jffs2_full_dirent *fd = NULL, *fd_list;
        uint32_t ino = 0;
        struct inode *inode = NULL;
@@@ -86,7 -85,6 +85,6 @@@
                return ERR_PTR(-ENAMETOOLONG);
  
        dir_f = JFFS2_INODE_INFO(dir_i);
-       c = JFFS2_SB_INFO(dir_i->i_sb);
  
        mutex_lock(&dir_f->sem);
  
  static int jffs2_readdir(struct file *filp, void *dirent, filldir_t filldir)
  {
        struct jffs2_inode_info *f;
-       struct jffs2_sb_info *c;
        struct inode *inode = filp->f_path.dentry->d_inode;
        struct jffs2_full_dirent *fd;
        unsigned long offset, curofs;
        D1(printk(KERN_DEBUG "jffs2_readdir() for dir_i #%lu\n", filp->f_path.dentry->d_inode->i_ino));
  
        f = JFFS2_INODE_INFO(inode);
-       c = JFFS2_SB_INFO(inode->i_sb);
  
        offset = filp->f_pos;
  
@@@ -609,8 -605,6 +605,8 @@@ static int jffs2_rmdir (struct inode *d
        int ret;
        uint32_t now = get_seconds();
  
 +      dentry_unhash(dentry);
 +
        for (fd = f->dents ; fd; fd = fd->next) {
                if (fd->ino)
                        return -ENOTEMPTY;
@@@ -786,9 -780,6 +782,9 @@@ static int jffs2_rename (struct inode *
        uint8_t type;
        uint32_t now;
  
 +      if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
 +              dentry_unhash(new_dentry);
 +
        /* The VFS will check for us and prevent trying to rename a
         * file over a directory and vice versa, but if it's a directory,
         * the VFS can't check whether the victim is empty. The filesystem
index 49b959029417ced9e72e6693bd4407303223a2cb,e963b86e296b8bf032e85b81182fd019cc17b47e..d40bfa1d9c914d42cea30f5a0946f185b117d055
@@@ -22,9 -22,7 +22,9 @@@ struct map_info
  
  struct physmap_flash_data {
        unsigned int            width;
 -      void                    (*set_vpp)(struct map_info *, int);
 +      int                     (*init)(struct platform_device *);
 +      void                    (*exit)(struct platform_device *);
 +      void                    (*set_vpp)(struct platform_device *, int);
        unsigned int            nr_parts;
        unsigned int            pfow_base;
        char                    *probe_type;
@@@ -37,8 -35,6 +37,6 @@@
  void physmap_configure(unsigned long addr, unsigned long size,
                int bankwidth, void (*set_vpp)(struct map_info *, int) );
  
- #ifdef CONFIG_MTD_PARTITIONS
  /*
   * Machines that wish to do flash partition may want to call this function in
   * their setup routine.
@@@ -50,6 -46,4 +48,4 @@@
   */
  void physmap_set_partitions(struct mtd_partition *parts, int num_parts);
  
- #endif /* defined(CONFIG_MTD_PARTITIONS) */
  #endif /* __LINUX_MTD_PHYSMAP__ */