mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
interconnect: qcom: Fix re-initializing the bcm
Currently, qcom_icc_bcm_init always assumes the bcm is not initialized. There is a possibility that same bcm can belong to multiple providers and re-initing the bcm adds the same bcm multiple times to the nodes which are under the control of the bcm. Hence add condition to check for bcm inited. Change-Id: I3961963a6ef1a7b76d7ab708f648146fe1a30c99 Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
This commit is contained in:
parent
9ddceddf30
commit
cd30d2af63
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -131,6 +131,10 @@ int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)
|
|||
size_t data_count;
|
||||
int i;
|
||||
|
||||
/* BCM is already initialised*/
|
||||
if (bcm->addr)
|
||||
return 0;
|
||||
|
||||
bcm->addr = cmd_db_read_addr(bcm->name);
|
||||
if (!bcm->addr) {
|
||||
dev_err(dev, "%s could not find RPMh address\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue