]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:45:19 +0000 (19:45 -0600)
commitc13a085b4a13cc0c46ae89879605adb6413442f1
treeab2ae2f5c521b744814fb810b71b8283268e8dc3
parentf590dcd7aef32abdb839842efd02ad1eb0d166fc
power: generic-adc-battery: check for duplicate properties copied from iio channels

BugLink: https://bugs.launchpad.net/bugs/1835972
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/power/supply/generic-adc-battery.c