diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2018-09-28 18:35:37 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2018-12-13 02:16:20 +0300 |
commit | 157ba1bb5fcb91366df3be5e63a04b799ff9cf64 (patch) | |
tree | efbb8664aa84ad60a9520966df63e0574bd44ca1 /include/linux/power | |
parent | efcca6bdfba1d579d86bd3f5ea65e5bf8e7deebe (diff) | |
download | linux-157ba1bb5fcb91366df3be5e63a04b799ff9cf64.tar.xz |
power: supply: charger-manager: fix race-condition in sysfs registration
This registers custom sysfs properties using the native functionality
of the power-supply framework, which cleans up the code a bit and
fixes a race-condition. Before this patch the sysfs attributes were
not properly registered to udev.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/charger-manager.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index c4fa907c8f14..2ce8d00c20de 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h @@ -119,7 +119,7 @@ struct charger_regulator { struct charger_cable *cables; int num_cables; - struct attribute_group attr_g; + struct attribute_group attr_grp; struct device_attribute attr_name; struct device_attribute attr_state; struct device_attribute attr_externally_control; @@ -186,6 +186,7 @@ struct charger_desc { int num_charger_regulators; struct charger_regulator *charger_regulators; + const struct attribute_group **sysfs_groups; const char *psy_fuel_gauge; |