diff options
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 43ce26d0f928..23b53fc405f5 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -535,7 +535,7 @@ static char *get_partition_name(int i) | |||
535 | return kstrdup(buf, GFP_KERNEL); | 535 | return kstrdup(buf, GFP_KERNEL); |
536 | } | 536 | } |
537 | 537 | ||
538 | static u_int64_t divide(u_int64_t n, u_int32_t d) | 538 | static uint64_t divide(uint64_t n, uint32_t d) |
539 | { | 539 | { |
540 | do_div(n, d); | 540 | do_div(n, d); |
541 | return n; | 541 | return n; |
@@ -551,8 +551,8 @@ static int init_nandsim(struct mtd_info *mtd) | |||
551 | struct nand_chip *chip = (struct nand_chip *)mtd->priv; | 551 | struct nand_chip *chip = (struct nand_chip *)mtd->priv; |
552 | struct nandsim *ns = (struct nandsim *)(chip->priv); | 552 | struct nandsim *ns = (struct nandsim *)(chip->priv); |
553 | int i, ret = 0; | 553 | int i, ret = 0; |
554 | u_int64_t remains; | 554 | uint64_t remains; |
555 | u_int64_t next_offset; | 555 | uint64_t next_offset; |
556 | 556 | ||
557 | if (NS_IS_INITIALIZED(ns)) { | 557 | if (NS_IS_INITIALIZED(ns)) { |
558 | NS_ERR("init_nandsim: nandsim is already initialized\n"); | 558 | NS_ERR("init_nandsim: nandsim is already initialized\n"); |
@@ -619,7 +619,7 @@ static int init_nandsim(struct mtd_info *mtd) | |||
619 | remains = ns->geom.totsz; | 619 | remains = ns->geom.totsz; |
620 | next_offset = 0; | 620 | next_offset = 0; |
621 | for (i = 0; i < parts_num; ++i) { | 621 | for (i = 0; i < parts_num; ++i) { |
622 | u_int64_t part_sz = (u_int64_t)parts[i] * ns->geom.secsz; | 622 | uint64_t part_sz = (uint64_t)parts[i] * ns->geom.secsz; |
623 | 623 | ||
624 | if (!part_sz || part_sz > remains) { | 624 | if (!part_sz || part_sz > remains) { |
625 | NS_ERR("bad partition size.\n"); | 625 | NS_ERR("bad partition size.\n"); |
@@ -2296,7 +2296,7 @@ static int __init ns_init_module(void) | |||
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | if (overridesize) { | 2298 | if (overridesize) { |
2299 | u_int64_t new_size = (u_int64_t)nsmtd->erasesize << overridesize; | 2299 | uint64_t new_size = (uint64_t)nsmtd->erasesize << overridesize; |
2300 | if (new_size >> overridesize != nsmtd->erasesize) { | 2300 | if (new_size >> overridesize != nsmtd->erasesize) { |
2301 | NS_ERR("overridesize is too big\n"); | 2301 | NS_ERR("overridesize is too big\n"); |
2302 | goto err_exit; | 2302 | goto err_exit; |