Commit be6299c6 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Sebastian Reichel

power: supply: sysfs: use power_supply_property_is_writeable()

Instead of open-coding the helper use it directly.
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240608-power-supply-extensions-v2-1-2dcd35b012ad@weissschuh.netSigned-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 29832ada
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment