summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorJakob Hauser <jahau@rocketmail.com>2023-10-01 15:17:44 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-10-04 22:27:34 +0200
commit3f26d8b6d1cbd41c5fa663c9ea48a2b832cfb58f (patch)
treecfb8b5821a47b5b4b4df45f8d4de9a6515c506a4 /drivers/power
parent1c6877f1768a34c04e3a82f9f950f78488a1753b (diff)
downloadlinux-stable-3f26d8b6d1cbd41c5fa663c9ea48a2b832cfb58f.tar.gz
linux-stable-3f26d8b6d1cbd41c5fa663c9ea48a2b832cfb58f.tar.bz2
linux-stable-3f26d8b6d1cbd41c5fa663c9ea48a2b832cfb58f.zip
power: supply: rt5033_charger: Replace "&pdev->dev" by "charger->dev" in probe
At the beginning of the probe function, "charger->dev" is set equal to "&pdev->dev". Therefore it's more clear to subsequently use "charger->dev" instead of "&pdev->dev". Signed-off-by: Jakob Hauser <jahau@rocketmail.com> Link: https://lore.kernel.org/r/39b4f00e010446e453905c8dc3ca1e47e9f2c5f8.1696165240.git.jahau@rocketmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/rt5033_charger.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/power/supply/rt5033_charger.c b/drivers/power/supply/rt5033_charger.c
index b34ef0ea6f8a..d19c7e80a92a 100644
--- a/drivers/power/supply/rt5033_charger.c
+++ b/drivers/power/supply/rt5033_charger.c
@@ -678,11 +678,11 @@ static int rt5033_charger_probe(struct platform_device *pdev)
psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.drv_data = charger;
- charger->psy = devm_power_supply_register(&pdev->dev,
+ charger->psy = devm_power_supply_register(charger->dev,
&rt5033_charger_desc,
&psy_cfg);
if (IS_ERR(charger->psy))
- return dev_err_probe(&pdev->dev, PTR_ERR(charger->psy),
+ return dev_err_probe(charger->dev, PTR_ERR(charger->psy),
"Failed to register power supply\n");
ret = rt5033_charger_dt_init(charger);
@@ -701,22 +701,22 @@ static int rt5033_charger_probe(struct platform_device *pdev)
np_edev = of_get_parent(np_conn);
charger->edev = extcon_find_edev_by_node(np_edev);
if (IS_ERR(charger->edev)) {
- dev_warn(&pdev->dev, "no extcon device found in device-tree\n");
+ dev_warn(charger->dev, "no extcon device found in device-tree\n");
goto out;
}
- ret = devm_work_autocancel(&pdev->dev, &charger->extcon_work,
+ ret = devm_work_autocancel(charger->dev, &charger->extcon_work,
rt5033_charger_extcon_work);
if (ret) {
- dev_err(&pdev->dev, "failed to initialize extcon work\n");
+ dev_err(charger->dev, "failed to initialize extcon work\n");
return ret;
}
charger->extcon_nb.notifier_call = rt5033_charger_extcon_notifier;
- ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
+ ret = devm_extcon_register_notifier_all(charger->dev, charger->edev,
&charger->extcon_nb);
if (ret) {
- dev_err(&pdev->dev, "failed to register extcon notifier\n");
+ dev_err(charger->dev, "failed to register extcon notifier\n");
return ret;
}
out: