aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-12-10 09:08:12 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-12-10 09:08:56 -0500
commit26cdb67c74aedc22367e6d0271f7f955220cca65 (patch)
tree49b8cacc7dcfa502d5cb469128c23c3e28cdc8b5 /include
parent3854be7712f7b4bdcaed14664fc7c7124b3fef0d (diff)
[MTD] Remove more strange u_intxx_t types
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/mtd.h26
-rw-r--r--include/linux/mtd/partitions.h2
2 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 95e585ecc297..adef674855f3 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -39,8 +39,8 @@ struct erase_info {
39 uint64_t fail_addr; 39 uint64_t fail_addr;
40 u_long time; 40 u_long time;
41 u_long retries; 41 u_long retries;
42 u_int dev; 42 unsigned dev;
43 u_int cell; 43 unsigned cell;
44 void (*callback) (struct erase_info *self); 44 void (*callback) (struct erase_info *self);
45 u_long priv; 45 u_long priv;
46 u_char state; 46 u_char state;
@@ -49,8 +49,8 @@ struct erase_info {
49 49
50struct mtd_erase_region_info { 50struct mtd_erase_region_info {
51 uint64_t offset; /* At which this region starts, from the beginning of the MTD */ 51 uint64_t offset; /* At which this region starts, from the beginning of the MTD */
52 u_int32_t erasesize; /* For this region */ 52 uint32_t erasesize; /* For this region */
53 u_int32_t numblocks; /* Number of blocks of erasesize in this region */ 53 uint32_t numblocks; /* Number of blocks of erasesize in this region */
54 unsigned long *lockmap; /* If keeping bitmap of locks */ 54 unsigned long *lockmap; /* If keeping bitmap of locks */
55}; 55};
56 56
@@ -102,14 +102,14 @@ struct mtd_oob_ops {
102 102
103struct mtd_info { 103struct mtd_info {
104 u_char type; 104 u_char type;
105 u_int32_t flags; 105 uint32_t flags;
106 uint64_t size; // Total size of the MTD 106 uint64_t size; // Total size of the MTD
107 107
108 /* "Major" erase size for the device. Naïve users may take this 108 /* "Major" erase size for the device. Naïve users may take this
109 * to be the only erase size available, or may use the more detailed 109 * to be the only erase size available, or may use the more detailed
110 * information below if they desire 110 * information below if they desire
111 */ 111 */
112 u_int32_t erasesize; 112 uint32_t erasesize;
113 /* Minimal writable flash unit size. In case of NOR flash it is 1 (even 113 /* Minimal writable flash unit size. In case of NOR flash it is 1 (even
114 * though individual bits can be cleared), in case of NAND flash it is 114 * though individual bits can be cleared), in case of NAND flash it is
115 * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR 115 * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
@@ -117,10 +117,10 @@ struct mtd_info {
117 * Any driver registering a struct mtd_info must ensure a writesize of 117 * Any driver registering a struct mtd_info must ensure a writesize of
118 * 1 or larger. 118 * 1 or larger.
119 */ 119 */
120 u_int32_t writesize; 120 uint32_t writesize;
121 121
122 u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) 122 uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
123 u_int32_t oobavail; // Available OOB bytes per block 123 uint32_t oobavail; // Available OOB bytes per block
124 124
125 /* 125 /*
126 * If erasesize is a power of 2 then the shift is stored in 126 * If erasesize is a power of 2 then the shift is stored in
@@ -233,7 +233,7 @@ struct mtd_info {
233 void (*put_device) (struct mtd_info *mtd); 233 void (*put_device) (struct mtd_info *mtd);
234}; 234};
235 235
236static inline u_int32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) 236static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
237{ 237{
238 if (mtd->erasesize_shift) 238 if (mtd->erasesize_shift)
239 return sz >> mtd->erasesize_shift; 239 return sz >> mtd->erasesize_shift;
@@ -241,14 +241,14 @@ static inline u_int32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
241 return sz; 241 return sz;
242} 242}
243 243
244static inline u_int32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd) 244static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd)
245{ 245{
246 if (mtd->erasesize_shift) 246 if (mtd->erasesize_shift)
247 return sz & mtd->erasesize_mask; 247 return sz & mtd->erasesize_mask;
248 return do_div(sz, mtd->erasesize); 248 return do_div(sz, mtd->erasesize);
249} 249}
250 250
251static inline u_int32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) 251static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
252{ 252{
253 if (mtd->writesize_shift) 253 if (mtd->writesize_shift)
254 return sz >> mtd->writesize_shift; 254 return sz >> mtd->writesize_shift;
@@ -256,7 +256,7 @@ static inline u_int32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
256 return sz; 256 return sz;
257} 257}
258 258
259static inline u_int32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd) 259static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)
260{ 260{
261 if (mtd->writesize_shift) 261 if (mtd->writesize_shift)
262 return sz & mtd->writesize_mask; 262 return sz & mtd->writesize_mask;
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 164c7d78687d..a45dd831b3f8 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -38,7 +38,7 @@ struct mtd_partition {
38 char *name; /* identifier string */ 38 char *name; /* identifier string */
39 uint64_t size; /* partition size */ 39 uint64_t size; /* partition size */
40 uint64_t offset; /* offset within the master MTD space */ 40 uint64_t offset; /* offset within the master MTD space */
41 u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ 41 uint32_t mask_flags; /* master MTD flags to mask out for this partition */
42 struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ 42 struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
43 struct mtd_info **mtdp; /* pointer to store the MTD object */ 43 struct mtd_info **mtdp; /* pointer to store the MTD object */
44}; 44};