summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-06-08 22:19:37 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-07-04 13:30:49 +0300
commitbe6299c6e55e971ffc060495708740a59aa0e45b (patch)
treefa91a89e6898123173588cbfbd81e696a0588d4d /drivers/power
parent29832adac01a1057e89579c977ef4776623ee463 (diff)
downloadlinux-be6299c6e55e971ffc060495708740a59aa0e45b.tar.xz
power: supply: sysfs: use power_supply_property_is_writeable()
Instead of open-coding the helper use it directly. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240608-power-supply-extensions-v2-1-2dcd35b012ad@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/power_supply_sysfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index b86e11bdc07e..3e63d165b2f7 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -379,8 +379,7 @@ static umode_t power_supply_attr_is_visible(struct kobject *kobj,
int property = psy->desc->properties[i];
if (property == attrno) {
- if (psy->desc->property_is_writeable &&
- psy->desc->property_is_writeable(psy, property) > 0)
+ if (power_supply_property_is_writeable(psy, property) > 0)
mode |= S_IWUSR;
return mode;