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)
committerSebastian Reichel <sre@kernel.org>
Fri, 6 Jul 2018 16:58:44 +0000 (18:58 +0200)
commita427503edaaed9b75ed9746a654cece7e93e60a8
treefba7ca50cfe6df3c412bd426692d8999c9d919b3
parent932d47448c3caa0fa99e84d7f5bc302aa286efd8
power: generic-adc-battery: check for duplicate properties copied from iio channels

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>
drivers/power/supply/generic-adc-battery.c