[PATCH v8 08/10] pmdomain: samsung: use dev_err() instead of pr_err()

André Draszik
2026-03-18T15:28:06Z

dev_err() gives us more consistent error messages, which include the
device. Switch to using dev_err().

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/pmdomain/samsung/exynos-pm-domains.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/pmdomain/samsung/exynos-pm-domains.c b/drivers/pmdomain/samsung/exynos-pm-domains.c
index f8c0d11e9b33..6b0a0f395509 100644
--- a/drivers/pmdomain/samsung/exynos-pm-domains.c
+++ b/drivers/pmdomain/samsung/exynos-pm-domains.c
@@ -30,6 +30,7 @@ struct exynos_pm_domain_config {
*/
struct exynos_pm_domain {
struct regmap *regmap;
+ struct device *dev;
struct generic_pm_domain pd;
u32 local_pwr_cfg;
u32 configuration_reg;
@@ -47,8 +48,9 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pwr = power_on ? pd->local_pwr_cfg : 0;
err = regmap_write(pd->regmap, pd->configuration_reg, pwr);
if (err) {
- pr_err("Regmap write for power domain %s %sable failed: %d\n",
- domain->name, power_on ? "en" : "dis", err);
+ dev_err(pd->dev,
+ "Regmap write for power domain %s %sable failed: %d\n",
+ domain->name, power_on ? "en" : "dis", err);
return err;
}

@@ -71,8 +73,8 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
/* Only return timeout if no other error also occurred. */
err = -ETIMEDOUT;
if (err)
- pr_err("Power domain %s %sable failed: %d\n", domain->name,
- power_on ? "en" : "dis", err);
+ dev_err(pd->dev, "Power domain %s %sable failed: %d\n",
+ domain->name, power_on ? "en" : "dis", err);

return err;
}
@@ -140,6 +142,8 @@ static int exynos_pd_probe(struct platform_device *pdev)
if (!pd)
return -ENOMEM;

+ pd->dev = dev;
+
pd->pd.name = exynos_get_domain_name(dev, np);
if (!pd->pd.name)
return -ENOMEM;

--
2.53.0.851.ga537e3e6e9-goog