@@ -39,8 +39,8 @@ struct erase_info {
3939 uint64_t fail_addr ;
4040 u_long time ;
4141 u_long retries ;
42- u_int dev ;
43- u_int cell ;
42+ unsigned dev ;
43+ unsigned cell ;
4444 void (* callback ) (struct erase_info * self );
4545 u_long priv ;
4646 u_char state ;
@@ -49,8 +49,8 @@ struct erase_info {
4949
5050struct mtd_erase_region_info {
5151 uint64_t offset ; /* At which this region starts, from the beginning of the MTD */
52- u_int32_t erasesize ; /* For this region */
53- u_int32_t numblocks ; /* Number of blocks of erasesize in this region */
52+ uint32_t erasesize ; /* For this region */
53+ uint32_t numblocks ; /* Number of blocks of erasesize in this region */
5454 unsigned long * lockmap ; /* If keeping bitmap of locks */
5555};
5656
@@ -102,25 +102,25 @@ struct mtd_oob_ops {
102102
103103struct mtd_info {
104104 u_char type ;
105- u_int32_t flags ;
105+ uint32_t flags ;
106106 uint64_t size ; // Total size of the MTD
107107
108108 /* "Major" erase size for the device. Naïve users may take this
109109 * to be the only erase size available, or may use the more detailed
110110 * information below if they desire
111111 */
112- u_int32_t erasesize ;
112+ uint32_t erasesize ;
113113 /* Minimal writable flash unit size. In case of NOR flash it is 1 (even
114114 * though individual bits can be cleared), in case of NAND flash it is
115115 * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
116116 * it is of ECC block size, etc. It is illegal to have writesize = 0.
117117 * Any driver registering a struct mtd_info must ensure a writesize of
118118 * 1 or larger.
119119 */
120- u_int32_t writesize ;
120+ uint32_t writesize ;
121121
122- u_int32_t oobsize ; // Amount of OOB data per block (e.g. 16)
123- u_int32_t oobavail ; // Available OOB bytes per block
122+ uint32_t oobsize ; // Amount of OOB data per block (e.g. 16)
123+ uint32_t oobavail ; // Available OOB bytes per block
124124
125125 /*
126126 * If erasesize is a power of 2 then the shift is stored in
@@ -233,30 +233,30 @@ struct mtd_info {
233233 void (* put_device ) (struct mtd_info * mtd );
234234};
235235
236- static inline u_int32_t mtd_div_by_eb (uint64_t sz , struct mtd_info * mtd )
236+ static inline uint32_t mtd_div_by_eb (uint64_t sz , struct mtd_info * mtd )
237237{
238238 if (mtd -> erasesize_shift )
239239 return sz >> mtd -> erasesize_shift ;
240240 do_div (sz , mtd -> erasesize );
241241 return sz ;
242242}
243243
244- static inline u_int32_t mtd_mod_by_eb (uint64_t sz , struct mtd_info * mtd )
244+ static inline uint32_t mtd_mod_by_eb (uint64_t sz , struct mtd_info * mtd )
245245{
246246 if (mtd -> erasesize_shift )
247247 return sz & mtd -> erasesize_mask ;
248248 return do_div (sz , mtd -> erasesize );
249249}
250250
251- static inline u_int32_t mtd_div_by_ws (uint64_t sz , struct mtd_info * mtd )
251+ static inline uint32_t mtd_div_by_ws (uint64_t sz , struct mtd_info * mtd )
252252{
253253 if (mtd -> writesize_shift )
254254 return sz >> mtd -> writesize_shift ;
255255 do_div (sz , mtd -> writesize );
256256 return sz ;
257257}
258258
259- static inline u_int32_t mtd_mod_by_ws (uint64_t sz , struct mtd_info * mtd )
259+ static inline uint32_t mtd_mod_by_ws (uint64_t sz , struct mtd_info * mtd )
260260{
261261 if (mtd -> writesize_shift )
262262 return sz & mtd -> writesize_mask ;
0 commit comments