瀏覽代碼

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

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>
Guenter Roeck 12 年之前
父節點
當前提交
f366fccd08
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/hwmon/pmbus/ltc2978.c

+ 1 - 1
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;