Skip to content

Commit

Permalink
mtd: nand: use more reasonable integer types
Browse files Browse the repository at this point in the history
Use 'unsigned int' instead of 'unsigned long' in the NAND chip description data
structure, because 32-bits is more than enough for our purposes. We do not need
64-bits, which is what we end up on 64-bit architectures. We declare many
instances of this data structure, so this should help saving some amount of
memory.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Apr 5, 2013
1 parent 9713511 commit ecb42fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/linux/mtd/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ struct nand_chip {
* @pagesize: size of the NAND page in bytes; if 0, then the real page size (as
* well as the eraseblock size) is determined from the extended NAND
* chip ID array)
* @erasesize: eraseblock size in bytes (determined from the extended ID if 0)
* @chipsize: total chip size in MiB
* @erasesize: eraseblock size in bytes (determined from the extended ID if 0)
* @options: stores various chip bit options
*/
struct nand_flash_dev {
Expand All @@ -595,10 +595,10 @@ struct nand_flash_dev {
};
uint8_t id[8];
};
unsigned long pagesize;
unsigned long chipsize;
unsigned long erasesize;
unsigned long options;
unsigned int pagesize;
unsigned int chipsize;
unsigned int erasesize;
unsigned int options;
};

/**
Expand Down

0 comments on commit ecb42fe

Please sign in to comment.