Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

soc: qcom: pd-mapper: Simplify code using of_root to get root device tree node

A few lines of code are removed by using the global non-NULL of_root
pointer to access the root device tree node instead of its recalculation.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260224110213.3929063-1-vladimir.zapolskiy@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Vladimir Zapolskiy and committed by
Bjorn Andersson
cdf0e445 11080cc4

+1 -7
+1 -7
drivers/soc/qcom/qcom_pd_mapper.c
··· 626 626 const struct qcom_pdm_domain_data * const *domains; 627 627 const struct of_device_id *match; 628 628 struct qcom_pdm_data *data; 629 - struct device_node *root; 630 629 int ret, i; 631 630 632 - root = of_find_node_by_path("/"); 633 - if (!root) 634 - return ERR_PTR(-ENODEV); 635 - 636 - match = of_match_node(qcom_pdm_domains, root); 637 - of_node_put(root); 631 + match = of_match_node(qcom_pdm_domains, of_root); 638 632 if (!match) { 639 633 pr_notice("PDM: no support for the platform, userspace daemon might be required.\n"); 640 634 return ERR_PTR(-ENODEV);