diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-11-12 11:28:56 +0100 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2025-11-26 19:43:12 -0600 |
| commit | d08989276a4ba82478613787e96791b234e953ba (patch) | |
| tree | 538ee28cd9fd562bd29a47ccaabc0072c40888cb /drivers/soc | |
| parent | 57f77cb75b74b11dc57ad28a8554dcaec295a0b6 (diff) | |
soc: tegra: Simplify with of_machine_device_match()
Replace open-coded getting root OF node and matching against it with
new of_machine_device_match() helper.
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251112-b4-of-match-matchine-data-v2-11-d46b72003fd6@linaro.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/soc')
| -rw-r--r-- | drivers/soc/tegra/common.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c index dff6d5ef4e46..d82b7670abb7 100644 --- a/drivers/soc/tegra/common.c +++ b/drivers/soc/tegra/common.c @@ -27,17 +27,7 @@ static const struct of_device_id tegra_machine_match[] = { bool soc_is_tegra(void) { - const struct of_device_id *match; - struct device_node *root; - - root = of_find_node_by_path("/"); - if (!root) - return false; - - match = of_match_node(tegra_machine_match, root); - of_node_put(root); - - return match != NULL; + return of_machine_device_match(tegra_machine_match); } static int tegra_core_dev_init_opp_state(struct device *dev) |
