interconnect: qcom: rpm: fix registration race
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 6 Mar 2023 07:56:36 +0000 (08:56 +0100)
committerGeorgi Djakov <djakov@kernel.org>
Mon, 13 Mar 2023 19:12:16 +0000 (21:12 +0200)
commit90ae93d8affc1061cd87ca8ddd9a838c7d31a158
treed3c31365bc5bd8b27a37618c0ec9f2c10596b1ba
parentbc463201f60803fa6bf2741d59441031cd0910e4
interconnect: qcom: rpm: fix registration race

The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.

Switch to using the new API where the provider is not registered until
after it has been fully initialised.

Fixes: 62feb14ee8a3 ("interconnect: qcom: Consolidate interconnect RPM support")
Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230306075651.2449-9-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/icc-rpm.c