From: Thomas Weißschuh Date: Sat, 8 Jun 2024 19:19:37 +0000 (+0200) Subject: power: supply: sysfs: use power_supply_property_is_writeable() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be6299c6e55e;p=users%2Fwilly%2Fxarray.git power: supply: sysfs: use power_supply_property_is_writeable() Instead of open-coding the helper use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240608-power-supply-extensions-v2-1-2dcd35b012ad@weissschuh.net Signed-off-by: Sebastian Reichel --- 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;