]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: core: Cleanup power supply sysfs attribute list
authorMathew King <mathewk@chromium.org>
Mon, 4 May 2020 20:29:27 +0000 (14:29 -0600)
committerSebastian Reichel <sre@kernel.org>
Wed, 6 May 2020 22:53:38 +0000 (00:53 +0200)
commitf3b45720cbc10986613861ee4f44c9ee1ac09cdb
treee768ae3538d6d01fad2ad395b7c01f1bf476fe00
parentdadaa5ec7b0fc3ae34cfdc0de6db75feff27d7e5
power: supply: core: Cleanup power supply sysfs attribute list

Make the device attribute list used to create sysfs attributes more
robust by decoupling the list order from order of the enum defined in
power_supply.h. This is done by using a designated initializer in the
POWER_SUPPLY_ATTR macro.

Signed-off-by: Mathew King <mathewk@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c