Skip to content

Commit

Permalink
Merge tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc
Browse files Browse the repository at this point in the history
Pull remoteproc and rpmsg fixes from Bjorn Andersson:

 - fix screw-up when reversing boolean for rproc_stop()

 - add missing OF node refcounting dereferences

 - add missing MODULE_ALIAS in rpmsg_char

* tag 'rproc-v4.17-1' of git://github.com/andersson/remoteproc:
  rpmsg: added MODULE_ALIAS for rpmsg_char
  remoteproc: qcom: Fix potential device node leaks
  remoteproc: fix crashed parameter logic on stop call
  • Loading branch information
torvalds committed May 5, 2018
2 parents c12fd0f + 93dd4e7 commit f933147
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/remoteproc/qcom_q6v5_pil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ static int q6v5_alloc_memory_region(struct q6v5 *qproc)
dev_err(qproc->dev, "unable to resolve mba region\n");
return ret;
}
of_node_put(node);

qproc->mba_phys = r.start;
qproc->mba_size = resource_size(&r);
Expand All @@ -1100,6 +1101,7 @@ static int q6v5_alloc_memory_region(struct q6v5 *qproc)
dev_err(qproc->dev, "unable to resolve mpss region\n");
return ret;
}
of_node_put(node);

qproc->mpss_phys = qproc->mpss_reloc = r.start;
qproc->mpss_size = resource_size(&r);
Expand Down
4 changes: 2 additions & 2 deletions drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ int rproc_trigger_recovery(struct rproc *rproc)
if (ret)
return ret;

ret = rproc_stop(rproc, false);
ret = rproc_stop(rproc, true);
if (ret)
goto unlock_mutex;

Expand Down Expand Up @@ -1316,7 +1316,7 @@ void rproc_shutdown(struct rproc *rproc)
if (!atomic_dec_and_test(&rproc->power))
goto out;

ret = rproc_stop(rproc, true);
ret = rproc_stop(rproc, false);
if (ret) {
atomic_inc(&rproc->power);
goto out;
Expand Down
2 changes: 2 additions & 0 deletions drivers/rpmsg/rpmsg_char.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,6 @@ static void rpmsg_chrdev_exit(void)
unregister_chrdev_region(rpmsg_major, RPMSG_DEV_MAX);
}
module_exit(rpmsg_chrdev_exit);

MODULE_ALIAS("rpmsg:rpmsg_chrdev");
MODULE_LICENSE("GPL v2");
2 changes: 1 addition & 1 deletion include/linux/remoteproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
void rproc_add_subdev(struct rproc *rproc,
struct rproc_subdev *subdev,
int (*probe)(struct rproc_subdev *subdev),
void (*remove)(struct rproc_subdev *subdev, bool graceful));
void (*remove)(struct rproc_subdev *subdev, bool crashed));

void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev);

Expand Down

0 comments on commit f933147

Please sign in to comment.