diff options
author | Xianwei Zhao <xianwei.zhao@amlogic.com> | 2023-07-07 03:37:07 +0300 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-07-31 12:49:50 +0300 |
commit | fadf18180022743ff74b1f6ca4f3cff462ddaddb (patch) | |
tree | 31790858fdc3054255cec086edb38a4c067fe319 /drivers | |
parent | 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff) | |
download | linux-fadf18180022743ff74b1f6ca4f3cff462ddaddb.tar.xz |
soc: amlogic: use name instead of index as criterion
The variate 'index' could be equal to zero in some SoCs. Such as C3 SoC,
PWRC_C3_NNA_ID be defined zero. Use 'name' instead of 'index' as criterion.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Link: https://lore.kernel.org/r/20230707003710.2667989-2-xianwei.zhao@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/amlogic/meson-secure-pwrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 25b4b71df9b8..c11d65a3e3d9 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -179,7 +179,7 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) for (i = 0 ; i < match->count ; ++i) { struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; - if (!match->domains[i].index) + if (!match->domains[i].name) continue; dom->pwrc = pwrc; |