diff options
author | Georgi Djakov <georgi.djakov@linaro.org> | 2019-11-28 14:48:39 +0100 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2019-12-16 08:25:24 +0100 |
commit | b92c35e1b9c9211635df9e8fb060c69311871865 (patch) | |
tree | 1a9aa55866f3d9c90a5a1c424cd6a696c797ee4c /drivers/interconnect/qcom/qcs404.c | |
parent | interconnect: Add a common standard aggregate function (diff) | |
download | linux-b92c35e1b9c9211635df9e8fb060c69311871865.tar.xz linux-b92c35e1b9c9211635df9e8fb060c69311871865.zip |
interconnect: qcom: Use the standard aggregate function
Now we have a common function for standard aggregation, so let's use it,
instead of duplicating the code.
Reviewed-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect/qcom/qcs404.c')
-rw-r--r-- | drivers/interconnect/qcom/qcs404.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/interconnect/qcom/qcs404.c b/drivers/interconnect/qcom/qcs404.c index c8eb1276cce8..d4769a5ea182 100644 --- a/drivers/interconnect/qcom/qcs404.c +++ b/drivers/interconnect/qcom/qcs404.c @@ -327,15 +327,6 @@ static struct qcom_icc_desc qcs404_snoc = { .num_nodes = ARRAY_SIZE(qcs404_snoc_nodes), }; -static int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, - u32 peak_bw, u32 *agg_avg, u32 *agg_peak) -{ - *agg_avg += avg_bw; - *agg_peak = max(*agg_peak, peak_bw); - - return 0; -} - static int qcom_icc_set(struct icc_node *src, struct icc_node *dst) { struct qcom_icc_provider *qp; @@ -354,8 +345,8 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst) qp = to_qcom_provider(provider); list_for_each_entry(n, &provider->nodes, node_list) - qcom_icc_aggregate(n, 0, n->avg_bw, n->peak_bw, - &agg_avg, &agg_peak); + provider->aggregate(n, 0, n->avg_bw, n->peak_bw, + &agg_avg, &agg_peak); sum_bw = icc_units_to_bps(agg_avg); max_peak_bw = icc_units_to_bps(agg_peak); @@ -456,7 +447,7 @@ static int qnoc_probe(struct platform_device *pdev) INIT_LIST_HEAD(&provider->nodes); provider->dev = dev; provider->set = qcom_icc_set; - provider->aggregate = qcom_icc_aggregate; + provider->aggregate = icc_std_aggregate; provider->xlate = of_icc_xlate_onecell; provider->data = data; |