mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
29832adac0
commit
be6299c6e5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user