Skip to content

Commit

Permalink
hwmon: (pmbus/ltc2978) Use detected chip ID to select supported funct…
Browse files Browse the repository at this point in the history
…ionality

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: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.2+
Acked-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Guenter Roeck committed Mar 4, 2013
1 parent dbd712c commit f366fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/pmbus/ltc2978.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f366fcc

Please sign in to comment.