mirror of https://gitee.com/openkylin/linux.git
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
This commit is contained in:
commit
825118d1f1
|
@ -348,6 +348,7 @@ static int validate_hwmon_pack(struct atk_data *data, union acpi_object *obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
static char const *atk_sensor_type(union acpi_object *flags)
|
static char const *atk_sensor_type(union acpi_object *flags)
|
||||||
{
|
{
|
||||||
u64 type = flags->integer.value & ATK_TYPE_MASK;
|
u64 type = flags->integer.value & ATK_TYPE_MASK;
|
||||||
|
@ -370,6 +371,7 @@ static char const *atk_sensor_type(union acpi_object *flags)
|
||||||
|
|
||||||
return what;
|
return what;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void atk_print_sensor(struct atk_data *data, union acpi_object *obj)
|
static void atk_print_sensor(struct atk_data *data, union acpi_object *obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1462,7 +1462,8 @@ static struct w83781d_data *w83781d_update_device(struct device *dev)
|
||||||
data->pwm[i] =
|
data->pwm[i] =
|
||||||
w83781d_read_value(data,
|
w83781d_read_value(data,
|
||||||
W83781D_REG_PWM[i]);
|
W83781D_REG_PWM[i]);
|
||||||
if ((data->type != w83782d || !client->driver)
|
/* Only W83782D on SMBus has PWM3 and PWM4 */
|
||||||
|
if ((data->type != w83782d || !client)
|
||||||
&& i == 1)
|
&& i == 1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue