power: supply: core: simplify power_supply_class_init
authorSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 1 Mar 2024 22:58:27 +0000 (23:58 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 5 Mar 2024 23:21:34 +0000 (00:21 +0100)
commitea1ec769d1f01a9900127e83e63dfdd77d096c8a
tree74f6b911a89263e44e30acfdfcb6019c1a3b980d
parent68ade0976df7979eac5f1d46320ff798f5043af6
power: supply: core: simplify power_supply_class_init

Technically the sysfs attributes should be initialized
before the class is registered, since that will use them.
As a nice side effect this nicely simplifies the code,
since it allows dropping the helper variable.

Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240301-psy-class-cleanup-v1-2-aebe8c4b6b08@collabora.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c