Commit 1dde5a36 authored by Guenter Roeck's avatar Guenter Roeck Committed by Greg Kroah-Hartman

hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality

commit f366fccd upstream.

We read the chip ID from the chip, use it to determine if the chip ID provided
to the driver is correct, and report it if wrong. We should also use the
correct chip ID to select supported functionality.
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4404ee44
......@@ -326,7 +326,7 @@ static int ltc2978_probe(struct i2c_client *client,
data->temp_max = 0x7c00;
data->temp2_max = 0x7c00;
switch (id->driver_data) {
switch (data->id) {
case ltc2978:
info->read_word_data = ltc2978_read_word_data;
info->pages = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment