mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 13:51:52 +00:00
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>
This commit is contained in:
parent
efcca6bdfb
commit
157ba1bb5f
2 changed files with 24 additions and 30 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue