nvdimm: Remove usage of the deprecated ida_simple_xx() API
[linux-2.6-microblaze.git] / drivers / nvdimm / pfn_devs.c
index 0d08e21..5863481 100644 (file)
@@ -22,7 +22,7 @@ static void nd_pfn_release(struct device *dev)
 
        dev_dbg(dev, "trace\n");
        nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns);
-       ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id);
+       ida_free(&nd_region->pfn_ida, nd_pfn->id);
        kfree(nd_pfn->uuid);
        kfree(nd_pfn);
 }
@@ -326,7 +326,7 @@ static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region)
        if (!nd_pfn)
                return NULL;
 
-       nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL);
+       nd_pfn->id = ida_alloc(&nd_region->pfn_ida, GFP_KERNEL);
        if (nd_pfn->id < 0) {
                kfree(nd_pfn);
                return NULL;