summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_sysmon.c
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 15:11:57 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 23:53:07 +0300
commit4902676f04acc20fe12e49f5f4916f2659c2a7bc (patch)
treefadf7b89ad14b1ed27b91662b5ca724baccae6f5 /drivers/remoteproc/qcom_sysmon.c
parentbe37b1e0fb100a369cfb7ebf016491dfb6c71987 (diff)
downloadlinux-4902676f04acc20fe12e49f5f4916f2659c2a7bc.tar.xz
remoteproc: Make client initialize ops in rproc_subdev
In preparation of adding the additional prepare and unprepare operations make the client responsible for filling out the function pointers of the rproc_subdev. This makes the arguments to rproc_add_subdev() more manageable, in particular when some of the functions are left out. Tested-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [elder@linaro.org: added comment about assigning function pointers] Signed-off-by Alex Elder <elder@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_sysmon.c')
-rw-r--r--drivers/remoteproc/qcom_sysmon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c
index f085545d7da5..e976a602b015 100644
--- a/drivers/remoteproc/qcom_sysmon.c
+++ b/drivers/remoteproc/qcom_sysmon.c
@@ -469,7 +469,10 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
qmi_add_lookup(&sysmon->qmi, 43, 0, 0);
- rproc_add_subdev(rproc, &sysmon->subdev, sysmon_start, sysmon_stop);
+ sysmon->subdev.start = sysmon_start;
+ sysmon->subdev.stop = sysmon_stop;
+
+ rproc_add_subdev(rproc, &sysmon->subdev);
sysmon->nb.notifier_call = sysmon_notify;
blocking_notifier_chain_register(&sysmon_notifiers, &sysmon->nb);