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: Convert to of_machine_get_match()

Use the of_machine_get_match() helper instead of open-coding the same
operation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://patch.msgid.link/0d23a449e62ac85f04ff07bc2758efbaa709c9d1.1772468323.git.geert+renesas@glider.be
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Geert Uytterhoeven and committed by
Rob Herring (Arm)
3ee3d8a4 951318c4

+1 -7
+1 -7
drivers/soc/qcom/qcom_pd_mapper.c
··· 615 615 const struct qcom_pdm_domain_data * const *domains; 616 616 const struct of_device_id *match; 617 617 struct qcom_pdm_data *data; 618 - struct device_node *root; 619 618 int ret, i; 620 619 621 - root = of_find_node_by_path("/"); 622 - if (!root) 623 - return ERR_PTR(-ENODEV); 624 - 625 - match = of_match_node(qcom_pdm_domains, root); 626 - of_node_put(root); 620 + match = of_machine_get_match(qcom_pdm_domains); 627 621 if (!match) { 628 622 pr_notice("PDM: no support for the platform, userspace daemon might be required.\n"); 629 623 return ERR_PTR(-ENODEV);