Skip to content

Commit be6299c

Browse files
t-8chsre
authored andcommitted
power: supply: sysfs: use power_supply_property_is_writeable()
Instead of open-coding the helper use it directly. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://lore.kernel.org/r/20240608-power-supply-extensions-v2-1-2dcd35b012ad@weissschuh.net Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 29832ad commit be6299c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/power/supply/power_supply_sysfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ static umode_t power_supply_attr_is_visible(struct kobject *kobj,
379379
int property = psy->desc->properties[i];
380380

381381
if (property == attrno) {
382-
if (psy->desc->property_is_writeable &&
383-
psy->desc->property_is_writeable(psy, property) > 0)
382+
if (power_supply_property_is_writeable(psy, property) > 0)
384383
mode |= S_IWUSR;
385384

386385
return mode;

0 commit comments

Comments
 (0)