diff options
Diffstat (limited to 'drivers/block/null_blk.c')
-rw-r--r-- | drivers/block/null_blk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 5c8ba5484d86..a96ce7ec1ca5 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -510,17 +510,17 @@ static int null_lnvm_id(struct request_queue *q, struct nvm_id *id) id->ppaf.ch_offset = 56; id->ppaf.ch_len = 8; - do_div(size, bs); /* convert size to pages */ - do_div(size, 256); /* concert size to pgs pr blk */ + sector_div(size, bs); /* convert size to pages */ + size >>= 8; /* concert size to pgs pr blk */ grp = &id->groups[0]; grp->mtype = 0; grp->fmtype = 0; grp->num_ch = 1; grp->num_pg = 256; blksize = size; - do_div(size, (1 << 16)); + size >>= 16; grp->num_lun = size + 1; - do_div(blksize, grp->num_lun); + sector_div(blksize, grp->num_lun); grp->num_blk = blksize; grp->num_pln = 1; |