/* actual size of vring (in bytes) */
        size = PAGE_ALIGN(vring_size(rvring->len, rvring->align));
 
-       if (!idr_pre_get(&rproc->notifyids, GFP_KERNEL)) {
-               dev_err(dev, "idr_pre_get failed\n");
-               return -ENOMEM;
-       }
-
        /*
         * Allocate non-cacheable memory for the vring. In the future
         * this call will also configure the IOMMU for us
         * TODO: let the rproc know the notifyid of this vring
         * TODO: support predefined notifyids (via resource table)
         */
-       ret = idr_get_new(&rproc->notifyids, rvring, ¬ifyid);
+       ret = idr_alloc(&rproc->notifyids, rvring, 0, 0, GFP_KERNEL);
        if (ret) {
-               dev_err(dev, "idr_get_new failed: %d\n", ret);
+               dev_err(dev, "idr_alloc failed: %d\n", ret);
                dma_free_coherent(dev->parent, size, va, dma);
                return ret;
        }
+       notifyid = ret;
 
        /* Store largest notifyid */
        rproc->max_notifyid = max(rproc->max_notifyid, notifyid);