power: supply: bq2415x: fix race-condition in sysfs registration
authorSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 28 Sep 2018 08:38:09 +0000 (10:38 +0200)
committerSebastian Reichel <sre@kernel.org>
Wed, 12 Dec 2018 23:15:21 +0000 (00:15 +0100)
commit06215ce99988b8ce1e44ea096c5ef1fd202efb15
tree455f78bfe43b86920d80fd6f1012377773ab7100
parentcef8fe6a382cb556b590269e9d1dfc0241014903
power: supply: bq2415x: 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>
drivers/power/supply/bq2415x_charger.c