Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359361
b: refs/heads/master
c: 15fc611
h: refs/heads/master
i:
  359359: 5a16415
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent e521692 commit eadaedc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19dd2da3b4f643b65964a7f340000e27b5556f93
refs/heads/master: 15fc61106a203b4601336cdc2dd9efba259d491e
10 changes: 3 additions & 7 deletions trunk/drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
/* 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
Expand All @@ -221,12 +216,13 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
* TODO: let the rproc know the notifyid of this vring
* TODO: support predefined notifyids (via resource table)
*/
ret = idr_get_new(&rproc->notifyids, rvring, &notifyid);
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);
Expand Down

0 comments on commit eadaedc

Please sign in to comment.