Re: [PATCH] pmdomain: rockchip: add regulator dependency
From: Heiko Stübner
Date: Tue Mar 04 2025 - 15:45:04 EST
Am Dienstag, 4. März 2025, 15:27:59 MEZ schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When CONFIG_REGULATOR is disabled, this pmdomain driver fails to build:
>
> drivers/pmdomain/rockchip/pm-domains.c:653:30: error: implicit declaration of function 'devm_of_regulator_get'; did you mean 'devm_regulator_get'? [-Wimplicit-function-declaration]
> 653 | pd->supply = devm_of_regulator_get(pmu->dev, pd->node, "domain");
> | ^~~~~~~~~~~~~~~~~~~~~
> | devm_regulator_get
> drivers/pmdomain/rockchip/pm-domains.c:653:28: error: assignment to 'struct regulator *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 653 | pd->supply = devm_of_regulator_get(pmu->dev, pd->node, "domain");
> | ^
>
> Add a Kconfig dependency.
>
> Fixes: db6df2e3fc16 ("pmdomain: rockchip: add regulator support")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>