@@ -761,9 +761,9 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu
761
761
if (command == NAND_CMD_SEQIN ) {
762
762
int readcmd ;
763
763
764
- if (column >= mtd -> oobblock ) {
764
+ if (column >= mtd -> writesize ) {
765
765
/* OOB area */
766
- column -= mtd -> oobblock ;
766
+ column -= mtd -> writesize ;
767
767
readcmd = NAND_CMD_READOOB ;
768
768
} else if (column < 256 ) {
769
769
/* First 256 bytes --> READ0 */
@@ -1093,8 +1093,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch
1093
1093
size_t retlen ;
1094
1094
1095
1095
for (offs = 0 ; offs < mtd -> size ; offs += mtd -> erasesize ) {
1096
- ret = mtd -> read (mtd , offs , mtd -> oobblock , & retlen , buf );
1097
- if (retlen != mtd -> oobblock )
1096
+ ret = mtd -> read (mtd , offs , mtd -> writesize , & retlen , buf );
1097
+ if (retlen != mtd -> writesize )
1098
1098
continue ;
1099
1099
if (ret ) {
1100
1100
printk (KERN_WARNING "ECC error scanning DOC at 0x%x\n" , offs );
@@ -1118,8 +1118,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch
1118
1118
/* Only one mediaheader was found. We want buf to contain a
1119
1119
mediaheader on return, so we'll have to re-read the one we found. */
1120
1120
offs = doc -> mh0_page << this -> page_shift ;
1121
- ret = mtd -> read (mtd , offs , mtd -> oobblock , & retlen , buf );
1122
- if (retlen != mtd -> oobblock ) {
1121
+ ret = mtd -> read (mtd , offs , mtd -> writesize , & retlen , buf );
1122
+ if (retlen != mtd -> writesize ) {
1123
1123
/* Insanity. Give up. */
1124
1124
printk (KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n" );
1125
1125
return 0 ;
@@ -1139,7 +1139,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio
1139
1139
unsigned blocks , maxblocks ;
1140
1140
int offs , numheaders ;
1141
1141
1142
- buf = kmalloc (mtd -> oobblock , GFP_KERNEL );
1142
+ buf = kmalloc (mtd -> writesize , GFP_KERNEL );
1143
1143
if (!buf ) {
1144
1144
printk (KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n" );
1145
1145
return 0 ;
@@ -1247,7 +1247,7 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti
1247
1247
if (inftl_bbt_write )
1248
1248
end -= (INFTL_BBT_RESERVED_BLOCKS << this -> phys_erase_shift );
1249
1249
1250
- buf = kmalloc (mtd -> oobblock , GFP_KERNEL );
1250
+ buf = kmalloc (mtd -> writesize , GFP_KERNEL );
1251
1251
if (!buf ) {
1252
1252
printk (KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n" );
1253
1253
return 0 ;
0 commit comments