]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (pmbus/lm25066) Let enum chips start with index 0
authorGuenter Roeck <linux@roeck-us.net>
Thu, 6 Jun 2024 16:16:40 +0000 (09:16 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 11 Jun 2024 14:25:13 +0000 (07:25 -0700)
commitcbbb76e4b8bf2c938f75baf11272ca3536be9366
treecd2ffd9da55a153f577cedeec717653bbb7c2fd3
parent22558934447999f38bb521a57279aa7ecf3f2d74
hwmon: (pmbus/lm25066) Let enum chips start with index 0

Commit ac0c26bae662 ("hwmon: (lm25066) Use i2c_get_match_data()") changed
enum chips to start with 1 instead of 0, under the assumption that
the data pointer in of_device_id must not start with 0 (NULL) if
i2c_get_match_data() is used. However, that is perfectly fine as long as
there is also an i2c_device_id array with the same data which is used
as fallback in that case.

Let enum chips start with 0 to avoid confusion against other drivers
where the enum starts with 0 and i2c_get_match_data() is used as well.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/lm25066.c