Skip to content

Commit 75599d3

Browse files
krzksre
authored andcommitted
power_supply: apm_power: Use power_supply_*() API for accessing function attrs
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Jonghwa Lee <[email protected]> Acked-by: Pavel Machek <[email protected]> Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 091e73a commit 75599d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/power/apm_power.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#include <linux/apm-emulation.h>
1616

1717

18-
#define PSY_PROP(psy, prop, val) (psy->get_property(psy, \
18+
#define PSY_PROP(psy, prop, val) (power_supply_get_property(psy, \
1919
POWER_SUPPLY_PROP_##prop, val))
2020

21-
#define _MPSY_PROP(prop, val) (main_battery->get_property(main_battery, \
21+
#define _MPSY_PROP(prop, val) (power_supply_get_property(main_battery, \
2222
prop, val))
2323

2424
#define MPSY_PROP(prop, val) _MPSY_PROP(POWER_SUPPLY_PROP_##prop, val)

0 commit comments

Comments
 (0)