Commit 3c3c10bb authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: add leading underscore to all mtd functions

This patch renames all MTD functions by adding a "_" prefix:

mtd->erase -> mtd->_erase
mtd->read_oob -> mtd->_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent a6c22850
...@@ -262,9 +262,9 @@ static void fixup_st_m28w320cb(struct mtd_info *mtd) ...@@ -262,9 +262,9 @@ static void fixup_st_m28w320cb(struct mtd_info *mtd)
static void fixup_use_point(struct mtd_info *mtd) static void fixup_use_point(struct mtd_info *mtd)
{ {
struct map_info *map = mtd->priv; struct map_info *map = mtd->priv;
if (!mtd->point && map_is_linear(map)) { if (!mtd->_point && map_is_linear(map)) {
mtd->point = cfi_intelext_point; mtd->_point = cfi_intelext_point;
mtd->unpoint = cfi_intelext_unpoint; mtd->_unpoint = cfi_intelext_unpoint;
} }
} }
...@@ -274,8 +274,8 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) ...@@ -274,8 +274,8 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
struct cfi_private *cfi = map->fldrv_priv; struct cfi_private *cfi = map->fldrv_priv;
if (cfi->cfiq->BufWriteTimeoutTyp) { if (cfi->cfiq->BufWriteTimeoutTyp) {
printk(KERN_INFO "Using buffer write method\n" ); printk(KERN_INFO "Using buffer write method\n" );
mtd->write = cfi_intelext_write_buffers; mtd->_write = cfi_intelext_write_buffers;
mtd->writev = cfi_intelext_writev; mtd->_writev = cfi_intelext_writev;
} }
} }
...@@ -443,15 +443,15 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) ...@@ -443,15 +443,15 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
/* Fill in the default mtd operations */ /* Fill in the default mtd operations */
mtd->erase = cfi_intelext_erase_varsize; mtd->_erase = cfi_intelext_erase_varsize;
mtd->read = cfi_intelext_read; mtd->_read = cfi_intelext_read;
mtd->write = cfi_intelext_write_words; mtd->_write = cfi_intelext_write_words;
mtd->sync = cfi_intelext_sync; mtd->_sync = cfi_intelext_sync;
mtd->lock = cfi_intelext_lock; mtd->_lock = cfi_intelext_lock;
mtd->unlock = cfi_intelext_unlock; mtd->_unlock = cfi_intelext_unlock;
mtd->is_locked = cfi_intelext_is_locked; mtd->_is_locked = cfi_intelext_is_locked;
mtd->suspend = cfi_intelext_suspend; mtd->_suspend = cfi_intelext_suspend;
mtd->resume = cfi_intelext_resume; mtd->_resume = cfi_intelext_resume;
mtd->flags = MTD_CAP_NORFLASH; mtd->flags = MTD_CAP_NORFLASH;
mtd->name = map->name; mtd->name = map->name;
mtd->writesize = 1; mtd->writesize = 1;
...@@ -600,12 +600,12 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) ...@@ -600,12 +600,12 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
} }
#ifdef CONFIG_MTD_OTP #ifdef CONFIG_MTD_OTP
mtd->read_fact_prot_reg = cfi_intelext_read_fact_prot_reg; mtd->_read_fact_prot_reg = cfi_intelext_read_fact_prot_reg;
mtd->read_user_prot_reg = cfi_intelext_read_user_prot_reg; mtd->_read_user_prot_reg = cfi_intelext_read_user_prot_reg;
mtd->write_user_prot_reg = cfi_intelext_write_user_prot_reg; mtd->_write_user_prot_reg = cfi_intelext_write_user_prot_reg;
mtd->lock_user_prot_reg = cfi_intelext_lock_user_prot_reg; mtd->_lock_user_prot_reg = cfi_intelext_lock_user_prot_reg;
mtd->get_fact_prot_info = cfi_intelext_get_fact_prot_info; mtd->_get_fact_prot_info = cfi_intelext_get_fact_prot_info;
mtd->get_user_prot_info = cfi_intelext_get_user_prot_info; mtd->_get_user_prot_info = cfi_intelext_get_user_prot_info;
#endif #endif
/* This function has the potential to distort the reality /* This function has the potential to distort the reality
......
...@@ -192,7 +192,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) ...@@ -192,7 +192,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd)
struct cfi_private *cfi = map->fldrv_priv; struct cfi_private *cfi = map->fldrv_priv;
if (cfi->cfiq->BufWriteTimeoutTyp) { if (cfi->cfiq->BufWriteTimeoutTyp) {
pr_debug("Using buffer write method\n" ); pr_debug("Using buffer write method\n" );
mtd->write = cfi_amdstd_write_buffers; mtd->_write = cfi_amdstd_write_buffers;
} }
} }
...@@ -231,8 +231,8 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd) ...@@ -231,8 +231,8 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd)
static void fixup_use_secsi(struct mtd_info *mtd) static void fixup_use_secsi(struct mtd_info *mtd)
{ {
/* Setup for chips with a secsi area */ /* Setup for chips with a secsi area */
mtd->read_user_prot_reg = cfi_amdstd_secsi_read; mtd->_read_user_prot_reg = cfi_amdstd_secsi_read;
mtd->read_fact_prot_reg = cfi_amdstd_secsi_read; mtd->_read_fact_prot_reg = cfi_amdstd_secsi_read;
} }
static void fixup_use_erase_chip(struct mtd_info *mtd) static void fixup_use_erase_chip(struct mtd_info *mtd)
...@@ -241,7 +241,7 @@ static void fixup_use_erase_chip(struct mtd_info *mtd) ...@@ -241,7 +241,7 @@ static void fixup_use_erase_chip(struct mtd_info *mtd)
struct cfi_private *cfi = map->fldrv_priv; struct cfi_private *cfi = map->fldrv_priv;
if ((cfi->cfiq->NumEraseRegions == 1) && if ((cfi->cfiq->NumEraseRegions == 1) &&
((cfi->cfiq->EraseRegionInfo[0] & 0xffff) == 0)) { ((cfi->cfiq->EraseRegionInfo[0] & 0xffff) == 0)) {
mtd->erase = cfi_amdstd_erase_chip; mtd->_erase = cfi_amdstd_erase_chip;
} }
} }
...@@ -252,8 +252,8 @@ static void fixup_use_erase_chip(struct mtd_info *mtd) ...@@ -252,8 +252,8 @@ static void fixup_use_erase_chip(struct mtd_info *mtd)
*/ */
static void fixup_use_atmel_lock(struct mtd_info *mtd) static void fixup_use_atmel_lock(struct mtd_info *mtd)
{ {
mtd->lock = cfi_atmel_lock; mtd->_lock = cfi_atmel_lock;
mtd->unlock = cfi_atmel_unlock; mtd->_unlock = cfi_atmel_unlock;
mtd->flags |= MTD_POWERUP_LOCK; mtd->flags |= MTD_POWERUP_LOCK;
} }
...@@ -432,12 +432,12 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) ...@@ -432,12 +432,12 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
/* Fill in the default mtd operations */ /* Fill in the default mtd operations */
mtd->erase = cfi_amdstd_erase_varsize; mtd->_erase = cfi_amdstd_erase_varsize;
mtd->write = cfi_amdstd_write_words; mtd->_write = cfi_amdstd_write_words;
mtd->read = cfi_amdstd_read; mtd->_read = cfi_amdstd_read;
mtd->sync = cfi_amdstd_sync; mtd->_sync = cfi_amdstd_sync;
mtd->suspend = cfi_amdstd_suspend; mtd->_suspend = cfi_amdstd_suspend;
mtd->resume = cfi_amdstd_resume; mtd->_resume = cfi_amdstd_resume;
mtd->flags = MTD_CAP_NORFLASH; mtd->flags = MTD_CAP_NORFLASH;
mtd->name = map->name; mtd->name = map->name;
mtd->writesize = 1; mtd->writesize = 1;
...@@ -446,7 +446,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) ...@@ -446,7 +446,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
pr_debug("MTD %s(): write buffer size %d\n", __func__, pr_debug("MTD %s(): write buffer size %d\n", __func__,
mtd->writebufsize); mtd->writebufsize);
mtd->panic_write = cfi_amdstd_panic_write; mtd->_panic_write = cfi_amdstd_panic_write;
mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot; mtd->reboot_notifier.notifier_call = cfi_amdstd_reboot;
if (cfi->cfi_mode==CFI_MODE_CFI){ if (cfi->cfi_mode==CFI_MODE_CFI){
......
...@@ -228,15 +228,15 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) ...@@ -228,15 +228,15 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
} }
/* Also select the correct geometry setup too */ /* Also select the correct geometry setup too */
mtd->erase = cfi_staa_erase_varsize; mtd->_erase = cfi_staa_erase_varsize;
mtd->read = cfi_staa_read; mtd->_read = cfi_staa_read;
mtd->write = cfi_staa_write_buffers; mtd->_write = cfi_staa_write_buffers;
mtd->writev = cfi_staa_writev; mtd->_writev = cfi_staa_writev;
mtd->sync = cfi_staa_sync; mtd->_sync = cfi_staa_sync;
mtd->lock = cfi_staa_lock; mtd->_lock = cfi_staa_lock;
mtd->unlock = cfi_staa_unlock; mtd->_unlock = cfi_staa_unlock;
mtd->suspend = cfi_staa_suspend; mtd->_suspend = cfi_staa_suspend;
mtd->resume = cfi_staa_resume; mtd->_resume = cfi_staa_resume;
mtd->flags = MTD_CAP_NORFLASH & ~MTD_BIT_WRITEABLE; mtd->flags = MTD_CAP_NORFLASH & ~MTD_BIT_WRITEABLE;
mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */
mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
......
...@@ -101,7 +101,7 @@ static void fixup_use_fwh_lock(struct mtd_info *mtd) ...@@ -101,7 +101,7 @@ static void fixup_use_fwh_lock(struct mtd_info *mtd)
{ {
printk(KERN_NOTICE "using fwh lock/unlock method\n"); printk(KERN_NOTICE "using fwh lock/unlock method\n");
/* Setup for the chips with the fwh lock method */ /* Setup for the chips with the fwh lock method */
mtd->lock = fwh_lock_varsize; mtd->_lock = fwh_lock_varsize;
mtd->unlock = fwh_unlock_varsize; mtd->_unlock = fwh_unlock_varsize;
} }
#endif /* FWH_LOCK_H */ #endif /* FWH_LOCK_H */
...@@ -55,10 +55,10 @@ static struct mtd_info *map_absent_probe(struct map_info *map) ...@@ -55,10 +55,10 @@ static struct mtd_info *map_absent_probe(struct map_info *map)
mtd->name = map->name; mtd->name = map->name;
mtd->type = MTD_ABSENT; mtd->type = MTD_ABSENT;
mtd->size = map->size; mtd->size = map->size;
mtd->erase = map_absent_erase; mtd->_erase = map_absent_erase;
mtd->read = map_absent_read; mtd->_read = map_absent_read;
mtd->write = map_absent_write; mtd->_write = map_absent_write;
mtd->sync = map_absent_sync; mtd->_sync = map_absent_sync;
mtd->flags = 0; mtd->flags = 0;
mtd->erasesize = PAGE_SIZE; mtd->erasesize = PAGE_SIZE;
mtd->writesize = 1; mtd->writesize = 1;
......
...@@ -64,11 +64,11 @@ static struct mtd_info *map_ram_probe(struct map_info *map) ...@@ -64,11 +64,11 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
mtd->name = map->name; mtd->name = map->name;
mtd->type = MTD_RAM; mtd->type = MTD_RAM;
mtd->size = map->size; mtd->size = map->size;
mtd->erase = mapram_erase; mtd->_erase = mapram_erase;
mtd->get_unmapped_area = mapram_unmapped_area; mtd->_get_unmapped_area = mapram_unmapped_area;
mtd->read = mapram_read; mtd->_read = mapram_read;
mtd->write = mapram_write; mtd->_write = mapram_write;
mtd->sync = mapram_nop; mtd->_sync = mapram_nop;
mtd->flags = MTD_CAP_RAM; mtd->flags = MTD_CAP_RAM;
mtd->writesize = 1; mtd->writesize = 1;
......
...@@ -41,11 +41,11 @@ static struct mtd_info *map_rom_probe(struct map_info *map) ...@@ -41,11 +41,11 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
mtd->name = map->name; mtd->name = map->name;
mtd->type = MTD_ROM; mtd->type = MTD_ROM;
mtd->size = map->size; mtd->size = map->size;
mtd->get_unmapped_area = maprom_unmapped_area; mtd->_get_unmapped_area = maprom_unmapped_area;
mtd->read = maprom_read; mtd->_read = maprom_read;
mtd->write = maprom_write; mtd->_write = maprom_write;
mtd->sync = maprom_nop; mtd->_sync = maprom_nop;
mtd->erase = maprom_erase; mtd->_erase = maprom_erase;
mtd->flags = MTD_CAP_ROM; mtd->flags = MTD_CAP_ROM;
mtd->erasesize = map->size; mtd->erasesize = map->size;
mtd->writesize = 1; mtd->writesize = 1;
......
...@@ -285,11 +285,11 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) ...@@ -285,11 +285,11 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
dev->mtd.writesize = 1; dev->mtd.writesize = 1;
dev->mtd.type = MTD_RAM; dev->mtd.type = MTD_RAM;
dev->mtd.flags = MTD_CAP_RAM; dev->mtd.flags = MTD_CAP_RAM;
dev->mtd.erase = block2mtd_erase; dev->mtd._erase = block2mtd_erase;
dev->mtd.write = block2mtd_write; dev->mtd._write = block2mtd_write;
dev->mtd.writev = mtd_writev; dev->mtd._writev = mtd_writev;
dev->mtd.sync = block2mtd_sync; dev->mtd._sync = block2mtd_sync;
dev->mtd.read = block2mtd_read; dev->mtd._read = block2mtd_read;
dev->mtd.priv = dev; dev->mtd.priv = dev;
dev->mtd.owner = THIS_MODULE; dev->mtd.owner = THIS_MODULE;
......
...@@ -565,11 +565,11 @@ void DoC2k_init(struct mtd_info *mtd) ...@@ -565,11 +565,11 @@ void DoC2k_init(struct mtd_info *mtd)
mtd->writesize = 512; mtd->writesize = 512;
mtd->oobsize = 16; mtd->oobsize = 16;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = doc_erase; mtd->_erase = doc_erase;
mtd->read = doc_read; mtd->_read = doc_read;
mtd->write = doc_write; mtd->_write = doc_write;
mtd->read_oob = doc_read_oob; mtd->_read_oob = doc_read_oob;
mtd->write_oob = doc_write_oob; mtd->_write_oob = doc_write_oob;
this->curfloor = -1; this->curfloor = -1;
this->curchip = -1; this->curchip = -1;
mutex_init(&this->lock); mutex_init(&this->lock);
......
...@@ -349,11 +349,11 @@ void DoCMil_init(struct mtd_info *mtd) ...@@ -349,11 +349,11 @@ void DoCMil_init(struct mtd_info *mtd)
mtd->writesize = 512; mtd->writesize = 512;
mtd->oobsize = 16; mtd->oobsize = 16;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = doc_erase; mtd->_erase = doc_erase;
mtd->read = doc_read; mtd->_read = doc_read;
mtd->write = doc_write; mtd->_write = doc_write;
mtd->read_oob = doc_read_oob; mtd->_read_oob = doc_read_oob;
mtd->write_oob = doc_write_oob; mtd->_write_oob = doc_write_oob;
this->curfloor = -1; this->curfloor = -1;
this->curchip = -1; this->curchip = -1;
......
...@@ -470,11 +470,11 @@ void DoCMilPlus_init(struct mtd_info *mtd) ...@@ -470,11 +470,11 @@ void DoCMilPlus_init(struct mtd_info *mtd)
mtd->writesize = 512; mtd->writesize = 512;
mtd->oobsize = 16; mtd->oobsize = 16;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = doc_erase; mtd->_erase = doc_erase;
mtd->read = doc_read; mtd->_read = doc_read;
mtd->write = doc_write; mtd->_write = doc_write;
mtd->read_oob = doc_read_oob; mtd->_read_oob = doc_read_oob;
mtd->write_oob = doc_write_oob; mtd->_write_oob = doc_write_oob;
this->curfloor = -1; this->curfloor = -1;
this->curchip = -1; this->curchip = -1;
......
...@@ -1820,12 +1820,12 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd) ...@@ -1820,12 +1820,12 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
mtd->writesize = DOC_LAYOUT_PAGE_SIZE; mtd->writesize = DOC_LAYOUT_PAGE_SIZE;
mtd->oobsize = DOC_LAYOUT_OOB_SIZE; mtd->oobsize = DOC_LAYOUT_OOB_SIZE;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = doc_erase; mtd->_erase = doc_erase;
mtd->read = doc_read; mtd->_read = doc_read;
mtd->write = doc_write; mtd->_write = doc_write;
mtd->read_oob = doc_read_oob; mtd->_read_oob = doc_read_oob;
mtd->write_oob = doc_write_oob; mtd->_write_oob = doc_write_oob;
mtd->block_isbad = doc_block_isbad; mtd->_block_isbad = doc_block_isbad;
mtd->ecclayout = &docg3_oobinfo; mtd->ecclayout = &docg3_oobinfo;
} }
......
...@@ -635,9 +635,9 @@ static int __init lart_flash_init (void) ...@@ -635,9 +635,9 @@ static int __init lart_flash_init (void)
mtd.erasesize = FLASH_BLOCKSIZE_MAIN; mtd.erasesize = FLASH_BLOCKSIZE_MAIN;
mtd.numeraseregions = ARRAY_SIZE(erase_regions); mtd.numeraseregions = ARRAY_SIZE(erase_regions);
mtd.eraseregions = erase_regions; mtd.eraseregions = erase_regions;
mtd.erase = flash_erase; mtd._erase = flash_erase;
mtd.read = flash_read; mtd._read = flash_read;
mtd.write = flash_write; mtd._write = flash_write;
mtd.owner = THIS_MODULE; mtd.owner = THIS_MODULE;
#ifdef LART_DEBUG #ifdef LART_DEBUG
......
...@@ -908,14 +908,14 @@ static int __devinit m25p_probe(struct spi_device *spi) ...@@ -908,14 +908,14 @@ static int __devinit m25p_probe(struct spi_device *spi)
flash->mtd.writesize = 1; flash->mtd.writesize = 1;
flash->mtd.flags = MTD_CAP_NORFLASH; flash->mtd.flags = MTD_CAP_NORFLASH;
flash->mtd.size = info->sector_size * info->n_sectors; flash->mtd.size = info->sector_size * info->n_sectors;
flash->mtd.erase = m25p80_erase; flash->mtd._erase = m25p80_erase;
flash->mtd.read = m25p80_read; flash->mtd._read = m25p80_read;
/* sst flash chips use AAI word program */ /* sst flash chips use AAI word program */
if (JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) if (JEDEC_MFR(info->jedec_id) == CFI_MFR_SST)
flash->mtd.write = sst_write; flash->mtd._write = sst_write;
else else
flash->mtd.write = m25p80_write; flash->mtd._write = m25p80_write;
/* prefer "small sector" erase if possible */ /* prefer "small sector" erase if possible */
if (info->flags & SECT_4K) { if (info->flags & SECT_4K) {
......
...@@ -215,8 +215,8 @@ static int __init ms02nv_init_one(ulong addr) ...@@ -215,8 +215,8 @@ static int __init ms02nv_init_one(ulong addr)
mtd->size = fixsize; mtd->size = fixsize;
mtd->name = (char *)ms02nv_name; mtd->name = (char *)ms02nv_name;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->read = ms02nv_read; mtd->_read = ms02nv_read;
mtd->write = ms02nv_write; mtd->_write = ms02nv_write;
mtd->writesize = 1; mtd->writesize = 1;
ret = -EIO; ret = -EIO;
......
...@@ -611,16 +611,16 @@ static int dataflash_write_user_otp(struct mtd_info *mtd, ...@@ -611,16 +611,16 @@ static int dataflash_write_user_otp(struct mtd_info *mtd,
static char *otp_setup(struct mtd_info *device, char revision) static char *otp_setup(struct mtd_info *device, char revision)
{ {
device->get_fact_prot_info = dataflash_get_otp_info; device->_get_fact_prot_info = dataflash_get_otp_info;
device->read_fact_prot_reg = dataflash_read_fact_otp; device->_read_fact_prot_reg = dataflash_read_fact_otp;
device->get_user_prot_info = dataflash_get_otp_info; device->_get_user_prot_info = dataflash_get_otp_info;
device->read_user_prot_reg = dataflash_read_user_otp; device->_read_user_prot_reg = dataflash_read_user_otp;
/* rev c parts (at45db321c and at45db1281 only!) use a /* rev c parts (at45db321c and at45db1281 only!) use a
* different write procedure; not (yet?) implemented. * different write procedure; not (yet?) implemented.
*/ */
if (revision > 'c') if (revision > 'c')
device->write_user_prot_reg = dataflash_write_user_otp; device->_write_user_prot_reg = dataflash_write_user_otp;
return ", OTP"; return ", OTP";
} }
...@@ -672,9 +672,9 @@ add_dataflash_otp(struct spi_device *spi, char *name, ...@@ -672,9 +672,9 @@ add_dataflash_otp(struct spi_device *spi, char *name,
device->owner = THIS_MODULE; device->owner = THIS_MODULE;
device->type = MTD_DATAFLASH; device->type = MTD_DATAFLASH;
device->flags = MTD_WRITEABLE; device->flags = MTD_WRITEABLE;
device->erase = dataflash_erase; device->_erase = dataflash_erase;
device->read = dataflash_read; device->_read = dataflash_read;
device->write = dataflash_write; device->_write = dataflash_write;
device->priv = priv; device->priv = priv;
device->dev.parent = &spi->dev; device->dev.parent = &spi->dev;
......
...@@ -126,12 +126,12 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address, ...@@ -126,12 +126,12 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
mtd->priv = mapped_address; mtd->priv = mapped_address;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = ram_erase; mtd->_erase = ram_erase;
mtd->point = ram_point; mtd->_point = ram_point;
mtd->unpoint = ram_unpoint; mtd->_unpoint = ram_unpoint;
mtd->get_unmapped_area = ram_get_unmapped_area; mtd->_get_unmapped_area = ram_get_unmapped_area;
mtd->read = ram_read; mtd->_read = ram_read;
mtd->write = ram_write; mtd->_write = ram_write;
if (mtd_device_register(mtd, NULL, 0)) if (mtd_device_register(mtd, NULL, 0))
return -EIO; return -EIO;
......
...@@ -142,11 +142,11 @@ static int register_device(char *name, unsigned long start, unsigned long len) ...@@ -142,11 +142,11 @@ static int register_device(char *name, unsigned long start, unsigned long len)
new->mtd.name = name; new->mtd.name = name;
new->mtd.size = len; new->mtd.size = len;
new->mtd.flags = MTD_CAP_RAM; new->mtd.flags = MTD_CAP_RAM;
new->mtd.erase = phram_erase; new->mtd._erase = phram_erase;
new->mtd.point = phram_point; new->mtd._point = phram_point;
new->mtd.unpoint = phram_unpoint; new->mtd._unpoint = phram_unpoint;
new->mtd.read = phram_read; new->mtd._read = phram_read;
new->mtd.write = phram_write; new->mtd._write = phram_write;
new->mtd.owner = THIS_MODULE; new->mtd.owner = THIS_MODULE;
new->mtd.type = MTD_RAM; new->mtd.type = MTD_RAM;
new->mtd.erasesize = PAGE_SIZE; new->mtd.erasesize = PAGE_SIZE;
......
...@@ -787,11 +787,11 @@ static int __init init_pmc551(void) ...@@ -787,11 +787,11 @@ static int __init init_pmc551(void)
mtd->size = msize; mtd->size = msize;
mtd->flags = MTD_CAP_RAM; mtd->flags = MTD_CAP_RAM;
mtd->erase = pmc551_erase; mtd->_erase = pmc551_erase;
mtd->read = pmc551_read; mtd->_read = pmc551_read;
mtd->write = pmc551_write; mtd->_write = pmc551_write;
mtd->point = pmc551_point; mtd->_point = pmc551_point;
mtd->unpoint = pmc551_unpoint; mtd->_unpoint = pmc551_unpoint;
mtd->type = MTD_RAM; mtd->type = MTD_RAM;
mtd->name = "PMC551 RAM board"; mtd->name = "PMC551 RAM board";
mtd->erasesize = 0x10000; mtd->erasesize = 0x10000;
......
...@@ -200,11 +200,11 @@ static int register_device(char *name, unsigned long start, unsigned long length ...@@ -200,11 +200,11 @@ static int register_device(char *name, unsigned long start, unsigned long length
(*curmtd)->mtdinfo->name = name; (*curmtd)->mtdinfo->name = name;
(*curmtd)->mtdinfo->size = length; (*curmtd)->mtdinfo->size = length;
(*curmtd)->mtdinfo->flags = MTD_CAP_RAM; (*curmtd)->mtdinfo->flags = MTD_CAP_RAM;
(*curmtd)->mtdinfo->erase = slram_erase; (*curmtd)->mtdinfo->_erase = slram_erase;
(*curmtd)->mtdinfo->point = slram_point; (*curmtd)->mtdinfo->_point = slram_point;
(*curmtd)->mtdinfo->unpoint = slram_unpoint; (*curmtd)->mtdinfo->_unpoint = slram_unpoint;
(*curmtd)->mtdinfo->read = slram_read; (*curmtd)->mtdinfo->_read = slram_read;
(*curmtd)->mtdinfo->write = slram_write; (*curmtd)->mtdinfo->_write = slram_write;
(*curmtd)->mtdinfo->owner = THIS_MODULE; (*curmtd)->mtdinfo->owner = THIS_MODULE;
(*curmtd)->mtdinfo->type = MTD_RAM; (*curmtd)->mtdinfo->type = MTD_RAM;
(*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ;
......
...@@ -846,9 +846,9 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank) ...@@ -846,9 +846,9 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank)
flash->mtd.erasesize = flash_devices[flash_index].sectorsize; flash->mtd.erasesize = flash_devices[flash_index].sectorsize;
flash->page_size = flash_devices[flash_index].pagesize; flash->page_size = flash_devices[flash_index].pagesize;
flash->erase_cmd = flash_devices[flash_index].erase_cmd; flash->erase_cmd = flash_devices[flash_index].erase_cmd;
flash->mtd.erase = spear_mtd_erase; flash->mtd._erase = spear_mtd_erase;
flash->mtd.read = spear_mtd_read; flash->mtd._read = spear_mtd_read;
flash->mtd.write = spear_mtd_write; flash->mtd._write = spear_mtd_write;
flash->dev_id = flash_devices[flash_index].device_id; flash->dev_id = flash_devices[flash_index].device_id;
dev_info(&dev->pdev->dev, "mtd .name=%s .size=%llx(%lluM)\n", dev_info(&dev->pdev->dev, "mtd .name=%s .size=%llx(%lluM)\n",
......
...@@ -403,9 +403,9 @@ static int __devinit sst25l_probe(struct spi_device *spi) ...@@ -403,9 +403,9 @@ static int __devinit sst25l_probe(struct spi_device *spi)
flash->mtd.erasesize = flash_info->erase_size; flash->mtd.erasesize = flash_info->erase_size;
flash->mtd.writesize = flash_info->page_size; flash->mtd.writesize = flash_info->page_size;
flash->mtd.size = flash_info->page_size * flash_info->nr_pages; flash->mtd.size = flash_info->page_size * flash_info->nr_pages;
flash->mtd.erase = sst25l_erase; flash->mtd._erase = sst25l_erase;
flash->mtd.read = sst25l_read; flash->mtd._read = sst25l_read;
flash->mtd.write = sst25l_write; flash->mtd._write = sst25l_write;
dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name, dev_info(&spi->dev, "%s (%lld KiB)\n", flash_info->name,
(long long)flash->mtd.size >> 10); (long long)flash->mtd.size >> 10);
......
...@@ -56,7 +56,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) ...@@ -56,7 +56,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
if (memcmp(mtd->name, "DiskOnChip", 10)) if (memcmp(mtd->name, "DiskOnChip", 10))
return; return;
if (!mtd->block_isbad) { if (!mtd->_block_isbad) {
printk(KERN_ERR printk(KERN_ERR
"INFTL no longer supports the old DiskOnChip drivers loaded via docprobe.\n" "INFTL no longer supports the old DiskOnChip drivers loaded via docprobe.\n"
"Please use the new diskonchip driver under the NAND subsystem.\n"); "Please use the new diskonchip driver under the NAND subsystem.\n");
......
...@@ -63,18 +63,18 @@ struct mtd_info *lpddr_cmdset(struct map_info *map) ...@@ -63,18 +63,18 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
/* Fill in the default mtd operations */ /* Fill in the default mtd operations */
mtd->read = lpddr_read; mtd->_read = lpddr_read;
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
mtd->flags = MTD_CAP_NORFLASH; mtd->flags = MTD_CAP_NORFLASH;
mtd->flags &= ~MTD_BIT_WRITEABLE; mtd->flags &= ~MTD_BIT_WRITEABLE;
mtd->erase = lpddr_erase; mtd->_erase = lpddr_erase;
mtd->write = lpddr_write_buffers; mtd->_write = lpddr_write_buffers;
mtd->writev = lpddr_writev; mtd->_writev = lpddr_writev;
mtd->lock = lpddr_lock; mtd->_lock = lpddr_lock;
mtd->unlock = lpddr_unlock; mtd->_unlock = lpddr_unlock;
if (map_is_linear(map)) { if (map_is_linear(map)) {
mtd->point = lpddr_point; mtd->_point = lpddr_point;
mtd->unpoint = lpddr_unpoint; mtd->_unpoint = lpddr_unpoint;
} }
mtd->size = 1 << lpddr->qinfo->DevSizeShift; mtd->size = 1 << lpddr->qinfo->DevSizeShift;
mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift;
......
...@@ -85,7 +85,7 @@ static int __init uclinux_mtd_init(void) ...@@ -85,7 +85,7 @@ static int __init uclinux_mtd_init(void)
} }
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->point = uclinux_point; mtd->_point = uclinux_point;
mtd->priv = mapp; mtd->priv = mapp;
uclinux_ram_mtdinfo = mtd; uclinux_ram_mtdinfo = mtd;
......
...@@ -544,9 +544,9 @@ static void vmu_queryblocks(struct mapleq *mq) ...@@ -544,9 +544,9 @@ static void vmu_queryblocks(struct mapleq *mq)
mtd_cur->flags = MTD_WRITEABLE|MTD_NO_ERASE; mtd_cur->flags = MTD_WRITEABLE|MTD_NO_ERASE;
mtd_cur->size = part_cur->numblocks * card->blocklen; mtd_cur->size = part_cur->numblocks * card->blocklen;
mtd_cur->erasesize = card->blocklen; mtd_cur->erasesize = card->blocklen;
mtd_cur->write = vmu_flash_write; mtd_cur->_write = vmu_flash_write;
mtd_cur->read = vmu_flash_read; mtd_cur->_read = vmu_flash_read;
mtd_cur->sync = vmu_flash_sync; mtd_cur->_sync = vmu_flash_sync;
mtd_cur->writesize = card->blocklen; mtd_cur->writesize = card->blocklen;
mpart = kmalloc(sizeof(struct mdev_part), GFP_KERNEL); mpart = kmalloc(sizeof(struct mdev_part), GFP_KERNEL);
......
...@@ -405,7 +405,7 @@ static int mtdchar_writeoob(struct file *file, struct mtd_info *mtd, ...@@ -405,7 +405,7 @@ static int mtdchar_writeoob(struct file *file, struct mtd_info *mtd,
if (length > 4096) if (length > 4096)
return -EINVAL; return -EINVAL;
if (!mtd->write_oob) if (!mtd->_write_oob)
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
else else
ret = access_ok(VERIFY_READ, ptr, length) ? 0 : -EFAULT; ret = access_ok(VERIFY_READ, ptr, length) ? 0 : -EFAULT;
...@@ -576,7 +576,7 @@ static int mtdchar_write_ioctl(struct mtd_info *mtd, ...@@ -576,7 +576,7 @@ static int mtdchar_write_ioctl(struct mtd_info *mtd,
!access_ok(VERIFY_READ, req.usr_data, req.len) || !access_ok(VERIFY_READ, req.usr_data, req.len) ||
!access_ok(VERIFY_READ, req.usr_oob, req.ooblen)) !access_ok(VERIFY_READ, req.usr_oob, req.ooblen))
return -EFAULT; return -EFAULT;
if (!mtd->write_oob) if (!mtd->_write_oob)
return -EOPNOTSUPP; return -EOPNOTSUPP;
ops.mode = req.mode; ops.mode = req.mode;
......
...@@ -777,16 +777,16 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c ...@@ -777,16 +777,16 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
concat->mtd.subpage_sft = subdev[0]->subpage_sft; concat->mtd.subpage_sft = subdev[0]->subpage_sft;
concat->mtd.oobsize = subdev[0]->oobsize; concat->mtd.oobsize = subdev[0]->oobsize;
concat->mtd.oobavail = subdev[0]->oobavail; concat->mtd.oobavail = subdev[0]->oobavail;
if (subdev[0]->writev) if (subdev[0]->_writev)
concat->mtd.writev = concat_writev; concat->mtd._writev = concat_writev;
if (subdev[0]->read_oob) if (subdev[0]->_read_oob)
concat->mtd.read_oob = concat_read_oob; concat->mtd._read_oob = concat_read_oob;
if (subdev[0]->write_oob) if (subdev[0]->_write_oob)
concat->mtd.write_oob = concat_write_oob; concat->mtd._write_oob = concat_write_oob;
if (subdev[0]->block_isbad) if (subdev[0]->_block_isbad)
concat->mtd.block_isbad = concat_block_isbad; concat->mtd._block_isbad = concat_block_isbad;
if (subdev[0]->block_markbad) if (subdev[0]->_block_markbad)
concat->mtd.block_markbad = concat_block_markbad; concat->mtd._block_markbad = concat_block_markbad;
concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks; concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks;
...@@ -833,8 +833,8 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c ...@@ -833,8 +833,8 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
if (concat->mtd.writesize != subdev[i]->writesize || if (concat->mtd.writesize != subdev[i]->writesize ||
concat->mtd.subpage_sft != subdev[i]->subpage_sft || concat->mtd.subpage_sft != subdev[i]->subpage_sft ||
concat->mtd.oobsize != subdev[i]->oobsize || concat->mtd.oobsize != subdev[i]->oobsize ||
!concat->mtd.read_oob != !subdev[i]->read_oob || !concat->mtd._read_oob != !subdev[i]->_read_oob ||
!concat->mtd.write_oob != !subdev[i]->write_oob) { !concat->mtd._write_oob != !subdev[i]->_write_oob) {
kfree(concat); kfree(concat);
printk("Incompatible OOB or ECC data on \"%s\"\n", printk("Incompatible OOB or ECC data on \"%s\"\n",
subdev[i]->name); subdev[i]->name);
...@@ -849,15 +849,15 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c ...@@ -849,15 +849,15 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
concat->num_subdev = num_devs; concat->num_subdev = num_devs;
concat->mtd.name = name; concat->mtd.name = name;
concat->mtd.erase = concat_erase; concat->mtd._erase = concat_erase;
concat->mtd.read = concat_read; concat->mtd._read = concat_read;
concat->mtd.write = concat_write; concat->mtd._write = concat_write;
concat->mtd.sync = concat_sync; concat->mtd._sync = concat_sync;
concat->mtd.lock = concat_lock; concat->mtd._lock = concat_lock;
concat->mtd.unlock = concat_unlock; concat->mtd._unlock = concat_unlock;
concat->mtd.suspend = concat_suspend; concat->mtd._suspend = concat_suspend;
concat->mtd.resume = concat_resume; concat->mtd._resume = concat_resume;
concat->mtd.get_unmapped_area = concat_get_unmapped_area; concat->mtd._get_unmapped_area = concat_get_unmapped_area;
/* /*
* Combine the erase block size info of the subdevices: * Combine the erase block size info of the subdevices:
......
...@@ -126,7 +126,7 @@ static int mtd_cls_resume(struct device *dev) ...@@ -126,7 +126,7 @@ static int mtd_cls_resume(struct device *dev)
{ {
struct mtd_info *mtd = dev_get_drvdata(dev); struct mtd_info *mtd = dev_get_drvdata(dev);
if (mtd && mtd->resume) if (mtd && mtd->_resume)
mtd_resume(mtd); mtd_resume(mtd);
return 0; return 0;
} }
...@@ -610,8 +610,8 @@ int __get_mtd_device(struct mtd_info *mtd) ...@@ -610,8 +610,8 @@ int __get_mtd_device(struct mtd_info *mtd)
if (!try_module_get(mtd->owner)) if (!try_module_get(mtd->owner))
return -ENODEV; return -ENODEV;
if (mtd->get_device) { if (mtd->_get_device) {
err = mtd->get_device(mtd); err = mtd->_get_device(mtd);
if (err) { if (err) {
module_put(mtd->owner); module_put(mtd->owner);
...@@ -675,8 +675,8 @@ void __put_mtd_device(struct mtd_info *mtd) ...@@ -675,8 +675,8 @@ void __put_mtd_device(struct mtd_info *mtd)
--mtd->usecount; --mtd->usecount;
BUG_ON(mtd->usecount < 0); BUG_ON(mtd->usecount < 0);
if (mtd->put_device) if (mtd->_put_device)
mtd->put_device(mtd); mtd->_put_device(mtd);
module_put(mtd->owner); module_put(mtd->owner);
} }
...@@ -729,9 +729,9 @@ int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, ...@@ -729,9 +729,9 @@ int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen) unsigned long count, loff_t to, size_t *retlen)
{ {
*retlen = 0; *retlen = 0;
if (!mtd->writev) if (!mtd->_writev)
return default_mtd_writev(mtd, vecs, count, to, retlen); return default_mtd_writev(mtd, vecs, count, to, retlen);
return mtd->writev(mtd, vecs, count, to, retlen); return mtd->_writev(mtd, vecs, count, to, retlen);
} }
EXPORT_SYMBOL_GPL(mtd_writev); EXPORT_SYMBOL_GPL(mtd_writev);
......
...@@ -262,7 +262,7 @@ static int part_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -262,7 +262,7 @@ static int part_erase(struct mtd_info *mtd, struct erase_info *instr)
void mtd_erase_callback(struct erase_info *instr) void mtd_erase_callback(struct erase_info *instr)
{ {
if (instr->mtd->erase == part_erase) { if (instr->mtd->_erase == part_erase) {
struct mtd_part *part = PART(instr->mtd); struct mtd_part *part = PART(instr->mtd);
if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN)
...@@ -410,54 +410,55 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, ...@@ -410,54 +410,55 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
*/ */
slave->mtd.dev.parent = master->dev.parent; slave->mtd.dev.parent = master->dev.parent;
slave->mtd.read = part_read; slave->mtd._read = part_read;
slave->mtd.write = part_write; slave->mtd._write = part_write;
if (master->panic_write) if (master->_panic_write)
slave->mtd.panic_write = part_panic_write; slave->mtd._panic_write = part_panic_write;
if (master->point && master->unpoint) { if (master->_point && master->_unpoint) {
slave->mtd.point = part_point; slave->mtd._point = part_point;
slave->mtd.unpoint = part_unpoint; slave->mtd._unpoint = part_unpoint;
} }
if (master->get_unmapped_area) if (master->_get_unmapped_area)
slave->mtd.get_unmapped_area = part_get_unmapped_area; slave->mtd._get_unmapped_area = part_get_unmapped_area;
if (master->read_oob) if (master->_read_oob)
slave->mtd.read_oob = part_read_oob; slave->mtd._read_oob = part_read_oob;
if (master->write_oob) if (master->_write_oob)
slave->mtd.write_oob = part_write_oob; slave->mtd._write_oob = part_write_oob;
if (master->read_user_prot_reg) if (master->_read_user_prot_reg)
slave->mtd.read_user_prot_reg = part_read_user_prot_reg; slave->mtd._read_user_prot_reg = part_read_user_prot_reg;
if (master->read_fact_prot_reg) if (master->_read_fact_prot_reg)
slave->mtd.read_fact_prot_reg = part_read_fact_prot_reg; slave->mtd._read_fact_prot_reg = part_read_fact_prot_reg;
if (master->write_user_prot_reg) if (master->_write_user_prot_reg)
slave->mtd.write_user_prot_reg = part_write_user_prot_reg; slave->mtd._write_user_prot_reg = part_write_user_prot_reg;
if (master->lock_user_prot_reg) if (master->_lock_user_prot_reg)
slave->mtd.lock_user_prot_reg = part_lock_user_prot_reg; slave->mtd._lock_user_prot_reg = part_lock_user_prot_reg;
if (master->get_user_prot_info) if (master->_get_user_prot_info)
slave->mtd.get_user_prot_info = part_get_user_prot_info; slave->mtd._get_user_prot_info = part_get_user_prot_info;
if (master->get_fact_prot_info) if (master->_get_fact_prot_info)
slave->mtd.get_fact_prot_info = part_get_fact_prot_info; slave->mtd._get_fact_prot_info = part_get_fact_prot_info;
if (master->sync) if (master->_sync)
slave->mtd.sync = part_sync; slave->mtd._sync = part_sync;
if (!partno && !master->dev.class && master->suspend && master->resume) { if (!partno && !master->dev.class && master->_suspend &&
slave->mtd.suspend = part_suspend; master->_resume) {
slave->mtd.resume = part_resume; slave->mtd._suspend = part_suspend;
slave->mtd._resume = part_resume;
} }
if (master->writev) if (master->_writev)
slave->mtd.writev = part_writev; slave->mtd._writev = part_writev;
if (master->lock) if (master->_lock)
slave->mtd.lock = part_lock; slave->mtd._lock = part_lock;
if (master->unlock) if (master->_unlock)
slave->mtd.unlock = part_unlock; slave->mtd._unlock = part_unlock;
if (master->is_locked) if (master->_is_locked)
slave->mtd.is_locked = part_is_locked; slave->mtd._is_locked = part_is_locked;
if (master->block_isbad) if (master->_block_isbad)
slave->mtd.block_isbad = part_block_isbad; slave->mtd._block_isbad = part_block_isbad;
if (master->block_markbad) if (master->_block_markbad)
slave->mtd.block_markbad = part_block_markbad; slave->mtd._block_markbad = part_block_markbad;
slave->mtd.erase = part_erase; slave->mtd._erase = part_erase;
slave->master = master; slave->master = master;
slave->offset = part->offset; slave->offset = part->offset;
...@@ -549,7 +550,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, ...@@ -549,7 +550,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
} }
slave->mtd.ecclayout = master->ecclayout; slave->mtd.ecclayout = master->ecclayout;
if (master->block_isbad) { if (master->_block_isbad) {
uint64_t offs = 0; uint64_t offs = 0;
while (offs < slave->mtd.size) { while (offs < slave->mtd.size) {
......
...@@ -585,10 +585,10 @@ static int alauda_init_media(struct alauda *al) ...@@ -585,10 +585,10 @@ static int alauda_init_media(struct alauda *al)
mtd->writesize = 1<<card->pageshift; mtd->writesize = 1<<card->pageshift;
mtd->type = MTD_NANDFLASH; mtd->type = MTD_NANDFLASH;
mtd->flags = MTD_CAP_NANDFLASH; mtd->flags = MTD_CAP_NANDFLASH;
mtd->read = alauda_read; mtd->_read = alauda_read;
mtd->write = alauda_write; mtd->_write = alauda_write;
mtd->erase = alauda_erase; mtd->_erase = alauda_erase;
mtd->block_isbad = alauda_isbad; mtd->_block_isbad = alauda_isbad;
mtd->priv = al; mtd->priv = al;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
......
...@@ -3483,21 +3483,21 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -3483,21 +3483,21 @@ int nand_scan_tail(struct mtd_info *mtd)
mtd->type = MTD_NANDFLASH; mtd->type = MTD_NANDFLASH;
mtd->flags = (chip->options & NAND_ROM) ? MTD_CAP_ROM : mtd->flags = (chip->options & NAND_ROM) ? MTD_CAP_ROM :
MTD_CAP_NANDFLASH; MTD_CAP_NANDFLASH;
mtd->erase = nand_erase; mtd->_erase = nand_erase;
mtd->point = NULL; mtd->_point = NULL;
mtd->unpoint = NULL; mtd->_unpoint = NULL;
mtd->read = nand_read; mtd->_read = nand_read;
mtd->write = nand_write; mtd->_write = nand_write;
mtd->panic_write = panic_nand_write; mtd->_panic_write = panic_nand_write;
mtd->read_oob = nand_read_oob; mtd->_read_oob = nand_read_oob;
mtd->write_oob = nand_write_oob; mtd->_write_oob = nand_write_oob;
mtd->sync = nand_sync; mtd->_sync = nand_sync;
mtd->lock = NULL; mtd->_lock = NULL;
mtd->unlock = NULL; mtd->_unlock = NULL;
mtd->suspend = nand_suspend; mtd->_suspend = nand_suspend;
mtd->resume = nand_resume; mtd->_resume = nand_resume;
mtd->block_isbad = nand_block_isbad; mtd->_block_isbad = nand_block_isbad;
mtd->block_markbad = nand_block_markbad; mtd->_block_markbad = nand_block_markbad;
mtd->writebufsize = mtd->writesize; mtd->writebufsize = mtd->writesize;
/* propagate ecc.layout to mtd_info */ /* propagate ecc.layout to mtd_info */
......
...@@ -4107,29 +4107,29 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) ...@@ -4107,29 +4107,29 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
/* Fill in remaining MTD driver data */ /* Fill in remaining MTD driver data */
mtd->type = ONENAND_IS_MLC(this) ? MTD_MLCNANDFLASH : MTD_NANDFLASH; mtd->type = ONENAND_IS_MLC(this) ? MTD_MLCNANDFLASH : MTD_NANDFLASH;
mtd->flags = MTD_CAP_NANDFLASH; mtd->flags = MTD_CAP_NANDFLASH;
mtd->erase = onenand_erase; mtd->_erase = onenand_erase;
mtd->point = NULL; mtd->_point = NULL;
mtd->unpoint = NULL; mtd->_unpoint = NULL;
mtd->read = onenand_read; mtd->_read = onenand_read;
mtd->write = onenand_write; mtd->_write = onenand_write;
mtd->read_oob = onenand_read_oob; mtd->_read_oob = onenand_read_oob;
mtd->write_oob = onenand_write_oob; mtd->_write_oob = onenand_write_oob;
mtd->panic_write = onenand_panic_write; mtd->_panic_write = onenand_panic_write;
#ifdef CONFIG_MTD_ONENAND_OTP #ifdef CONFIG_MTD_ONENAND_OTP
mtd->get_fact_prot_info = onenand_get_fact_prot_info; mtd->_get_fact_prot_info = onenand_get_fact_prot_info;
mtd->read_fact_prot_reg = onenand_read_fact_prot_reg; mtd->_read_fact_prot_reg = onenand_read_fact_prot_reg;
mtd->get_user_prot_info = onenand_get_user_prot_info; mtd->_get_user_prot_info = onenand_get_user_prot_info;
mtd->read_user_prot_reg = onenand_read_user_prot_reg; mtd->_read_user_prot_reg = onenand_read_user_prot_reg;
mtd->write_user_prot_reg = onenand_write_user_prot_reg; mtd->_write_user_prot_reg = onenand_write_user_prot_reg;
mtd->lock_user_prot_reg = onenand_lock_user_prot_reg; mtd->_lock_user_prot_reg = onenand_lock_user_prot_reg;
#endif #endif
mtd->sync = onenand_sync; mtd->_sync = onenand_sync;
mtd->lock = onenand_lock; mtd->_lock = onenand_lock;
mtd->unlock = onenand_unlock; mtd->_unlock = onenand_unlock;
mtd->suspend = onenand_suspend; mtd->_suspend = onenand_suspend;
mtd->resume = onenand_resume; mtd->_resume = onenand_resume;
mtd->block_isbad = onenand_block_isbad; mtd->_block_isbad = onenand_block_isbad;
mtd->block_markbad = onenand_block_markbad; mtd->_block_markbad = onenand_block_markbad;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->writebufsize = mtd->writesize; mtd->writebufsize = mtd->writesize;
......
...@@ -340,11 +340,11 @@ static int gluebi_create(struct ubi_device_info *di, ...@@ -340,11 +340,11 @@ static int gluebi_create(struct ubi_device_info *di,
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->writesize = di->min_io_size; mtd->writesize = di->min_io_size;
mtd->erasesize = vi->usable_leb_size; mtd->erasesize = vi->usable_leb_size;
mtd->read = gluebi_read; mtd->_read = gluebi_read;
mtd->write = gluebi_write; mtd->_write = gluebi_write;
mtd->erase = gluebi_erase; mtd->_erase = gluebi_erase;
mtd->get_device = gluebi_get_device; mtd->_get_device = gluebi_get_device;
mtd->put_device = gluebi_put_device; mtd->_put_device = gluebi_put_device;
/* /*
* In case of dynamic a volume, MTD device size is just volume size. In * In case of dynamic a volume, MTD device size is just volume size. In
......
...@@ -263,10 +263,10 @@ static int efx_mtd_probe_device(struct efx_nic *efx, struct efx_mtd *efx_mtd) ...@@ -263,10 +263,10 @@ static int efx_mtd_probe_device(struct efx_nic *efx, struct efx_mtd *efx_mtd)
part->mtd.owner = THIS_MODULE; part->mtd.owner = THIS_MODULE;
part->mtd.priv = efx_mtd; part->mtd.priv = efx_mtd;
part->mtd.name = part->name; part->mtd.name = part->name;
part->mtd.erase = efx_mtd_erase; part->mtd._erase = efx_mtd_erase;
part->mtd.read = efx_mtd->ops->read; part->mtd._read = efx_mtd->ops->read;
part->mtd.write = efx_mtd->ops->write; part->mtd._write = efx_mtd->ops->write;
part->mtd.sync = efx_mtd_sync; part->mtd._sync = efx_mtd_sync;
if (mtd_device_register(&part->mtd, NULL, 0)) if (mtd_device_register(&part->mtd, NULL, 0))
goto fail; goto fail;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment