summaryrefslogtreecommitdiff
path: root/drivers/lightnvm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/core.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 5f1988df1593..db4a1b8f1561 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -851,33 +851,32 @@ EXPORT_SYMBOL(nvm_get_tgt_bb_tbl);
static int nvm_core_init(struct nvm_dev *dev)
{
struct nvm_id *id = &dev->identity;
- struct nvm_id_group *grp = &id->grp;
struct nvm_geo *geo = &dev->geo;
int ret;
memcpy(&geo->ppaf, &id->ppaf, sizeof(struct nvm_addr_format));
- if (grp->mtype != 0) {
+ if (id->mtype != 0) {
pr_err("nvm: memory type not supported\n");
return -EINVAL;
}
/* Whole device values */
- geo->nr_chnls = grp->num_ch;
- geo->nr_luns = grp->num_lun;
+ geo->nr_chnls = id->num_ch;
+ geo->nr_luns = id->num_lun;
/* Generic device geometry values */
- geo->ws_min = grp->ws_min;
- geo->ws_opt = grp->ws_opt;
- geo->ws_seq = grp->ws_seq;
- geo->ws_per_chk = grp->ws_per_chk;
- geo->nr_chks = grp->num_chk;
- geo->sec_size = grp->csecs;
- geo->oob_size = grp->sos;
- geo->mccap = grp->mccap;
+ geo->ws_min = id->ws_min;
+ geo->ws_opt = id->ws_opt;
+ geo->ws_seq = id->ws_seq;
+ geo->ws_per_chk = id->ws_per_chk;
+ geo->nr_chks = id->num_chk;
+ geo->sec_size = id->csecs;
+ geo->oob_size = id->sos;
+ geo->mccap = id->mccap;
geo->max_rq_size = dev->ops->max_phys_sect * geo->sec_size;
- geo->sec_per_chk = grp->clba;
+ geo->sec_per_chk = id->clba;
geo->sec_per_lun = geo->sec_per_chk * geo->nr_chks;
geo->all_luns = geo->nr_luns * geo->nr_chnls;