hwmon: (occ) Fix power sensor indexing
authorEddie James <eajames@linux.ibm.com>
Tue, 19 Mar 2019 21:01:58 +0000 (16:01 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 29 Mar 2019 16:51:44 +0000 (09:51 -0700)
commit8e6af454117a51dbf6c8a47c00180a0c235052fe
tree0bab954ac8f6a520f0df8b9f5bfc492c32d7a45a
parenta165dcc923ada2ffdee1d4f41f12f81b66d04c55
hwmon: (occ) Fix power sensor indexing

In the case of power sensor version 0xA0, the sensor indexing overlapped
with the "caps" power sensors, resulting in probe failure and kernel
warnings. Fix this by specifying the next index for each power sensor
version.

Fixes: 54076cb3b5ff ("hwmon (occ): Add sensor attributes and register ...")
Cc: stable@vger.kernel.org
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/occ/common.c