nvdimm: Remove usage of the deprecated ida_simple_xx() API
[linux-2.6-microblaze.git] / drivers / nvdimm / btt_devs.c
index fabbb31..497fd43 100644 (file)
@@ -19,7 +19,7 @@ static void nd_btt_release(struct device *dev)
 
        dev_dbg(dev, "trace\n");
        nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns);
-       ida_simple_remove(&nd_region->btt_ida, nd_btt->id);
+       ida_free(&nd_region->btt_ida, nd_btt->id);
        kfree(nd_btt->uuid);
        kfree(nd_btt);
 }
@@ -191,7 +191,7 @@ static struct device *__nd_btt_create(struct nd_region *nd_region,
        if (!nd_btt)
                return NULL;
 
-       nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL);
+       nd_btt->id = ida_alloc(&nd_region->btt_ida, GFP_KERNEL);
        if (nd_btt->id < 0)
                goto out_nd_btt;
 
@@ -217,7 +217,7 @@ static struct device *__nd_btt_create(struct nd_region *nd_region,
        return dev;
 
 out_put_id:
-       ida_simple_remove(&nd_region->btt_ida, nd_btt->id);
+       ida_free(&nd_region->btt_ida, nd_btt->id);
 
 out_nd_btt:
        kfree(nd_btt);