aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-12-10 22:55:48 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-12-11 02:00:24 +0100
commite959fdb1cd4dccd37225cac654901a862c52e0c5 (patch)
tree4853527bbd5acd06d41c81eebd13f682627569ef
parentpower: ip5xxx_power: Fix uninitialized variable read (diff)
downloadwireguard-linux-e959fdb1cd4dccd37225cac654901a862c52e0c5.tar.xz
wireguard-linux-e959fdb1cd4dccd37225cac654901a862c52e0c5.zip
power: supply: mm8013: use accessor for driver data
Instead of directly accessing the structure member, use the accessor. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-1-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--drivers/power/supply/mm8013.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/mm8013.c b/drivers/power/supply/mm8013.c
index 5bcfaeeda3db..4adf2acc2779 100644
--- a/drivers/power/supply/mm8013.c
+++ b/drivers/power/supply/mm8013.c
@@ -90,7 +90,7 @@ static int mm8013_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{
- struct mm8013_chip *chip = psy->drv_data;
+ struct mm8013_chip *chip = power_supply_get_drvdata(psy);
int ret = 0;
u32 regval;