From 4902676f04acc20fe12e49f5f4916f2659c2a7bc Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Tue, 26 Jun 2018 07:11:57 -0500 Subject: 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 Signed-off-by: Bjorn Andersson [elder@linaro.org: added comment about assigning function pointers] Signed-off-by Alex Elder Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_sysmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/remoteproc/qcom_sysmon.c') 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); -- cgit