]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
power: supply: mm8013: use accessor for driver data
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 10 Dec 2024 21:55:48 +0000 (22:55 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 11 Dec 2024 01:00:24 +0000 (02:00 +0100)
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>
drivers/power/supply/mm8013.c

index 5bcfaeeda3db755e05a449cbfd6f0c72162b6890..4adf2acc2779366323e52c467cff4f99ebb9d6ea 100644 (file)
@@ -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;