@@ -761,9 +761,9 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu
761761 if (command == NAND_CMD_SEQIN ) {
762762 int readcmd ;
763763
764- if (column >= mtd -> oobblock ) {
764+ if (column >= mtd -> writesize ) {
765765 /* OOB area */
766- column -= mtd -> oobblock ;
766+ column -= mtd -> writesize ;
767767 readcmd = NAND_CMD_READOOB ;
768768 } else if (column < 256 ) {
769769 /* First 256 bytes --> READ0 */
@@ -1093,8 +1093,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch
10931093 size_t retlen ;
10941094
10951095 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 )
10981098 continue ;
10991099 if (ret ) {
11001100 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
11181118 /* Only one mediaheader was found. We want buf to contain a
11191119 mediaheader on return, so we'll have to re-read the one we found. */
11201120 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 ) {
11231123 /* Insanity. Give up. */
11241124 printk (KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n" );
11251125 return 0 ;
@@ -1139,7 +1139,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio
11391139 unsigned blocks , maxblocks ;
11401140 int offs , numheaders ;
11411141
1142- buf = kmalloc (mtd -> oobblock , GFP_KERNEL );
1142+ buf = kmalloc (mtd -> writesize , GFP_KERNEL );
11431143 if (!buf ) {
11441144 printk (KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n" );
11451145 return 0 ;
@@ -1247,7 +1247,7 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti
12471247 if (inftl_bbt_write )
12481248 end -= (INFTL_BBT_RESERVED_BLOCKS << this -> phys_erase_shift );
12491249
1250- buf = kmalloc (mtd -> oobblock , GFP_KERNEL );
1250+ buf = kmalloc (mtd -> writesize , GFP_KERNEL );
12511251 if (!buf ) {
12521252 printk (KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n" );
12531253 return 0 ;
0 commit comments