summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-02-21 18:49:40 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-14 18:26:23 (GMT)
commit1dde5a361f21ed7d606593c3b8814c6f2232fedc (patch)
tree68aa946b73f08b41ad6dabab90a2079404859c9d /drivers/hwmon
parent4404ee445fdf033a17781c7d80adb5b14e198577 (diff)
downloadlinux-fsl-qoriq-1dde5a361f21ed7d606593c3b8814c6f2232fedc.tar.xz
hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality
commit f366fccd0809f13ba20d64cae3c83f7338c88af7 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: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/ltc2978.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index cc29a7e..a58de38 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -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;