]> git.itanic.dy.fi Git - linux-stable/commit
power: generic-adc-battery: check for duplicate properties copied from iio channels
authorH. Nikolaus Schaller <hns@goldelico.com>
Tue, 26 Jun 2018 13:28:30 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:42 +0000 (09:26 +0200)
commitf9f67667e0aeeafa65b4542c3d67173871baedfd
treec21a34f3084f79dec1c185549ef4e7f3cbe040e8
parent54cecb7440bc280d54ce3e843818f2f9c3b1f98c
power: generic-adc-battery: check for duplicate properties copied from iio channels

commit a427503edaaed9b75ed9746a654cece7e93e60a8 upstream.

If an iio channel defines a basic property, there are duplicate entries
in /sys/class/power/*/uevent.

So add a check to avoid duplicates. Since all channels may be duplicates,
we have to modify the related error check.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Cc: stable@vger.kernel.org
Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/supply/generic-adc-battery.c