aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-08 19:25:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-08 19:25:00 -0400
commit825118d1f1ce577224a3e668960717d8fc8ac44e (patch)
tree56d9308c36aee10da43e358c75e2f42a80d9f539
parentb20a4e9483df7469359f0c7f3f70bd2f5b78677f (diff)
parent848ddf116b3d1711c956fac8627be12dfe8d736f (diff)
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: hwmon: (w83781d) Fix W83782D support (NULL pointer dereference) hwmon: (asus_atk0110) Fix compiler warning
-rw-r--r--drivers/hwmon/asus_atk0110.c2
-rw-r--r--drivers/hwmon/w83781d.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index 0897edef2574..bff0103610c1 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -348,6 +348,7 @@ static int validate_hwmon_pack(struct atk_data *data, union acpi_object *obj)
348 return 0; 348 return 0;
349} 349}
350 350
351#ifdef DEBUG
351static char const *atk_sensor_type(union acpi_object *flags) 352static char const *atk_sensor_type(union acpi_object *flags)
352{ 353{
353 u64 type = flags->integer.value & ATK_TYPE_MASK; 354 u64 type = flags->integer.value & ATK_TYPE_MASK;
@@ -370,6 +371,7 @@ static char const *atk_sensor_type(union acpi_object *flags)
370 371
371 return what; 372 return what;
372} 373}
374#endif
373 375
374static void atk_print_sensor(struct atk_data *data, union acpi_object *obj) 376static void atk_print_sensor(struct atk_data *data, union acpi_object *obj)
375{ 377{
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index dbfb30c588d8..0bdab959b736 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1462,7 +1462,8 @@ static struct w83781d_data *w83781d_update_device(struct device *dev)
1462 data->pwm[i] = 1462 data->pwm[i] =
1463 w83781d_read_value(data, 1463 w83781d_read_value(data,
1464 W83781D_REG_PWM[i]); 1464 W83781D_REG_PWM[i]);
1465 if ((data->type != w83782d || !client->driver) 1465 /* Only W83782D on SMBus has PWM3 and PWM4 */
1466 if ((data->type != w83782d || !client)
1466 && i == 1) 1467 && i == 1)
1467 break; 1468 break;
1468 } 1469 }